Click here to Skip to main content
15,887,585 members
Everything / Programming Languages / Pascal

Pascal

Pascal

Great Reads

by Chris Boss
Why some prefer the BASIC language over others
by José Cintra
Some suggestions of algorithms for solving the Pascal Triangle, addressing iterative, recursive and functional paradigms
by RickZeeland
Make installations simpler with Inno Setup [Tasks]
by nortee
This will allow you to create a configuration file in either INI or XML format minus all the hard work in Delphi.

Latest Articles

by RickZeeland
Make installations simpler with Inno Setup [Tasks]
by ToughDev
Revisiting Mario Game Written in Pascal
by ToughDev
A look at Borland Turbo C/C++
by ADMGNS
A very simple method to resampling points from a digital image and drawing it as antique mosaics, dots (stippling) and Voronoi cells

All Articles

Sort by Title

Pascal 

25 Nov 2020 by OriginalGriff
You're running late - the rest of your class was trying to get us to do this homework last week ... But I'll tell you what we told them: Quote: We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it...
25 Nov 2020 by Patrice T
Posting your homework is not a question. You show no attempt to solve the problem yourself, you have no question, your main effort is pasting the requirement, you just want us to do your HomeWork. HomeWork problems are simplified versions of the...
24 Aug 2014 by José Cintra
Some suggestions of algorithms for computing the Fibonacci numbers addressing iterative, recursive and functional paradigms
18 Aug 2014 by José Cintra
Some suggestions of algorithms for solving the Pascal Triangle, addressing iterative, recursive and functional paradigms
23 Jan 2011 by G C Sraty
I am trying to access an on-board parallel port using Pascal in WinXP. I have written the port write/read code using Inline ASM code and invoked "Allowio" on the Pascal program. I write bytes to the port (in this case 0x378) but find that only the two (2) least significant data bits respond....
19 Nov 2015 by Axif.Miax
Hi Everyone, Please help me to decode file (.LOL!) or give me any guideline to decode them
19 Nov 2015 by BillWoodruff
The .LOL! file always begins with a joke whose length will vary, and then may include a structured 4D-Six-Sigma XML hierarchic matrix of a number of links to bitmaps, each link describing the bitmap format, resolution, and, optionally, including the actual bits of the bitmap as a binary BLOB in...
17 Jan 2011 by Dave Kreskowiak
First, nobody is going to just give you code for an entire project.Second, who still uses PASCAL??
17 Jan 2011 by Sandeep Mewara
Stick to this question of yours[^].You don't need to repost your question. Further, asking of code would not be encouraged. Other question already shows your effort and one who knows would surely try to help. :thumbsup:
24 Feb 2020 by Member 14753870
hello, this is my program about lifo animation, there isn't syntax error, but when i want try to menu number 2, there is exit code 216. anyone can help me? thank you. program SLL_LIFO; uses crt; type pointermhs = ^recmhs; recmhs...
24 Feb 2020 by OriginalGriff
Compiling does not mean your code is right! :laugh: Think of the development process as writing an email: compiling successfully means that you wrote the email in the right language - English, rather than German for example - not that the email...
24 Feb 2020 by Richard MacCutchan
You do not have any explicit return value in your main code so the exit code will be some random value: e.g. 216. Try changing option 3 from 3: exit; to 3: Exit(0);
23 Aug 2018 by Chris Boss
Why some prefer the BASIC language over others
30 Jun 2017 by Árpád Kocsis
I am learning Pascal in school, but i was reading alot about it that it is not used nowdays. So Should i learn python or Java as my first programming language, and learn pascal in school for the only reason to get a good grade? Or should i just Learn Pascal(Lazarus) and learn another language...
9 Mar 2014 by leon de boer
Pascal is indeed rarely used these days, and that from someone still listed on the free pascal credits :-)It does have one positive in that it's syntax does lend itself towards learning c#, it is arguable that c# is closer to pascal than it is to c.The key thing to remember is much of...
9 Mar 2014 by Sergey Alexandrovich Kryukov
It would the best idea to learn it all. I must say that Borland-style language (Free Pascal has a strong bias to Borland Pascal, actually, for some very good reasons) can give you excellent background in programming, which C++ will hardly give you, in a clear, non-bloated, "academic" way. Pascal...
29 Oct 2014 by Karozzi
I want to know the best tools to unpack Inno Setup-based installers and recover the script and installer files of any IS installer. Im currently using InnoExtractor application. If you know other similar ways/applications please let me know.Thanks in advance!
7 Oct 2016 by nqioweryuadfge
I have tested the elegance of Free Pascal especially when you run console applications with Lazarus. In C, things are different! First, you have to I don't know pause your application to prevent it from closing abruptly! And second, it seems to be very tedious in terms of coding applications...
7 Oct 2016 by Mehdi Gholam
Security risks in programs is a function of the complexity of the application ( the more complex the app the more chance of security risks) this includes the whole stack that is used from the OS up.Generally virtual machine languages (sand-boxed) are more secure like .net java etc. by the...
9 Jan 2014 by Member 10446575
Actually i done one project in morfik software now i was build that has a .exe and .dll also but i know dll not impossible to run.thats'y asking can i run .exe file.
15 Jan 2021 by OriginalGriff
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us...
15 Mar 2015 by Afzaal Ahmad Zeeshan
No -- this is pretty much off-topic as per this website. Try it yourself.
15 Mar 2015 by Dave Kreskowiak
The onyl person that's going to convert that code is YOU. If you expect someone to do your work for you, you've most assuredly come to the wrong website.
15 Jan 2014 by Member 10526961
Hi,I have copied some example code for a program that Exchanges data over a network. I am using delphi 7 as my IDE. I get no errors when running the programI have two seperate applications, one for the server and one for the client.Here is the Source code for the server:procedure...
8 Apr 2016 by Member 12444738
Hello,I really need some help i am desperate for a solution!I have a offline messenging form/unit.It will not allow me to compileThe FULL Code is here: http://beyluxe.googlecode.com/svn/trunk/mine/OfflinesUnit.dcu[^]I get the following errors: Build [Error]...
8 Apr 2016 by Patrice T
Quote:I haven't tried an awful lot as i don't have the knowledge to do much!There is not much to try, read the error message. [Error] OfflinesUnit.pas(103): Undeclared identifier: 'LoadString' [Error] OfflinesUnit.pas(142): Undeclared identifier: 'LoadString'It tells you that LoadString...
8 Apr 2016 by Member 12444738
@ppolymorphe could you help me via skype ?
10 Oct 2013 by Milos S.
Hi,im trying to create a parser for excel to generate a pricelist from a csv file.Im doing this with a parser and a generator. To get all the devices containered, i've created a device object and want to list the accessories in it but i have a problem.unit Device;interface uses ...
22 Apr 2022 by ADMGNS
A very simple method to resampling points from a digital image and drawing it as antique mosaics, dots (stippling) and Voronoi cells
6 Apr 2024 by Andrew Truckle
I originally asked this question here on StackOverflow: Detecting .NET8 with Inno Setup and InnoDependenciyInstaller And, it the comments it was suggested that I also reach out here to the author of the NuGet package. So, here goes: I am...
6 Apr 2024 by Pete O'Hanlon
As this appears to use netcorecheck, it means that the version check is an exact version, so passing 8.0.0 inside looks to see if that version is installed, so if you need 8.0.3, this would have to be passed in.
12 Sep 2018 by Chris Boss
A short introduction to using the Powerbasic 6.0 console compiler with the Ontime RTOS-32 embedded operating system
7 Jun 2011 by ahmadpico
OK this program about a solar tracker with pic16f876 when i compiled the program in micro pascal compiler i see this errors Program programme;Var l,i:longint;Label L1;begintrisb:=$FC;trisc:=$FF;trisa:=$FF;ADCON1:=$8E;portb:=0;while (true)...
7 Jun 2011 by Sergey Alexandrovich Kryukov
You're not reporting properly. You're showing compile-time errors (you need to mention that). What is "1 304"? Is that column/line numbers? You don't show the code lines with the errors. You need to show them and add comments where the errors are.Now, your problem is non-ASCII characters in...
27 Nov 2012 by lilyNaz
I have written a code in C++ builder in which I use header FileCtrl.hpp and I call SelectDirectory procedure so that the user can choose the a directory. When I change the drive to empty floppy disk or DVD drives, I get Exception EInOutError. I used try catch, bu it didn't work.try{ ...
29 Nov 2012 by Dharmateja Challa
To trap EInOutError enable "I/O checking" in the Pascal tab of the project options in order for EInOutError exceptions to be trapped. It seems EInOutError is a delphi class
22 Dec 2012 by lilyNaz
I used SHBrowseFolder instead and everything turned out OK.
28 Jan 2014 by Member 10538783
Hello, this is my program, there is no compiler message, but at the runtime it exits, can anyone please help me? program MyProgr; var F: text; t:Textfile; a,count:array of Integer; b:Integer; i,int:Integer; ...
28 Jan 2014 by Kornfeld Eliyahu Peter
Your count array has no dimensions! So assigning values to its element is a memory violation...
28 Jan 2014 by CPallini
Error 216 is a general protection fault. Probably a memory error in your case. For instance, count is declared (and used) as an array, but you never allocated memory for it.
17 Jan 2022 by Member 9439045
Hello This function is written using Pascal software. Someone can guide what this function does? Thanks .. procedure int2Hex(intnum:integer; var Bytes:Tsb8); var b,b1,b2,b3,b4,b5,b6,b7,b8:byte; n:integer; begin n:= intnum; b:=n; b8:=b...
17 Jan 2022 by OriginalGriff
All it does is mask and shift values: Look up the AND and shr operators and it's pretty obvious: Pascal - Bit Operators[^]
17 Jan 2022 by CPallini
public static byte [] getNibbles(UInt32 ui32) { const int Nibbles = 8; byte [] b = new byte[Nibbles]; for ( int n=0; n>= 4; } return b; }
25 Apr 2021 by Irfan Ullah 2021
Hello All, Thanks for participation and your precious suggestions, I have done some of the algorithms but I stuck in these two, Could you (experts) find time complexity for the following two algorithm with explanation (steps) so I can solve the...
25 Apr 2021 by CPallini
Think about it. Time complexity depends on n. In procedureSomeAlg3, there are two consecutive loops ranging from 1 to sqrt(n). What is their contribution? There is, in addition, a loop ranging from 1 to 10. Does it partecipate to algorithm...
8 Jun 2016 by Member 12551108
I have some FPC code. The problem, is that it takes two (2) presses of the down arrow key to get to the "bot_bar" procedure.procedure oneliners;var Twriters : array[1..10] of string;var Toneliner : array[1..10] of string;var S : string;var Foneline : string;var ...
30 Jun 2019 by ianyjones@outlook.com
Good morning folks, A newby here, so a big thank you, in advance to everyone. Much appreciated!!. Please forgive me if this post is in the wrong "place". Some years ago now, I studied and done (did ?) some Computer Programming........Graphics mainly.......in BASIC (Basica, GW-Basic mainly)...
30 Jun 2019 by Super Lloyd
May I suggest an alternative idea? On one hand it's a perfectly valid query. On the other you might want to consider trying C#? It might seem overkill, since you'll be starting from a position of knowing nothing... But, as you no doubt realise, there are tons of helpful C# resource on this...
30 Jun 2019 by CPallini
There are better alternatives, nowdays. As already suggested you could use C#. Another choice could be Python (see, for instance Program Arcade Games With Python And Pygame[^]). I know this is side-stepping your question, but it is, in my opinion, for the good. It is better to teach your kids...
22 Feb 2012 by danikecoz
pascal code to reset the program?
22 Feb 2012 by Sergey Alexandrovich Kryukov
There is no such universal concept as "reset". You should develop some semantic procedure changing the state of the application, that's it.—SA
3 Apr 2014 by DatSik
Hello everyone I hope someone can help me with my question. So i started researching on moving and clicking the mouse within delphi, From what i remember people used to use Mouse_Events but that is now replaced by SendInput, And SendInput just seems so complicated compared to the old way. On top...
4 Apr 2014 by Sergey Alexandrovich Kryukov
Thank you for showing the code.In your first fragment, the problem is: your values of XCoordinate and YCoordinate are lost, you later overwrite these values with 0. Under the debugger, check up these values at the point of assignment, and also at the point of calling SendInput.In the...
4 Nov 2019 by User-8380610
After failing to log in my password, I obtained a temporary password. I'm now logged in and I want to change the temporary password to something I can remember. What I have tried: I've tried logging in with my password several times. A obtained a temporary password and I want to change the...
4 Nov 2019 by OriginalGriff
Hover over your username at the top right of the page. From the drop down, select "My Settings" The main page of the settings (the "Account" page) lets you enter a new password by clicking "Change" beside "Password" - just do so, and press the "Save my Settings" button.
3 Jan 2015 by Member 11350283
please help me to get it !although the pseudocode is enough for me .
3 Jan 2015 by Richard MacCutchan
Try https://www.google.com/search?q=additive%20phylogeny[^].
7 Sep 2022 by Myk Darko
I need to create an installer which checks for the installation of SQL Server 2019 Express Edition, Direct X, VC 2022 and Dotnet FX. With help from this link I was able to include the download pages in the setup. My problem is how to check if...
7 Sep 2022 by Maciej Los
Check this out: https://stackoverflow.com/questions/41222685/how-to-detect-sql-server-installation[^]
31 Dec 2017 by kkdxghlctlcxxtidyuum
Hello, After installing a new distribution of GNU/Linux, I found that various applications were using a different icon set for their MenuStrips and ToolBars. My old distribution used the GTK+ icon set (Debian), my new distribution uses the Mint-X icon set (Linux Mint). My question is: how does...
31 Dec 2017 by Richard MacCutchan
See How to Set the Look and Feel (The Java™ Tutorials - Creating a GUI With JFC/Swing - Modifying the Look and Feel)[^]
16 Aug 2014 by Richard MacCutchan
See http://en.wikipedia.org/wiki/Pascal's_triangle[^]. You need to create an algorithm based on the rules for the triangle. Once you have the algorithm then you just need to convert it to code.
17 Aug 2014 by Satya Chamakuri
Hi, I think, the output what you are displaying is not a pascal triangle & to print that out put what you written is not required, its hardly 4 lines of code...
1 Jul 2014 by Member 10478237
Hello,everyone.I have study the source code of Ultrastar deluxe.It's static display the music note when sing screen occur,my question is:1. How can I display the music note matching with the singer's sing and scroll from right to left of singing screen.2. How To determine the rating...
21 Feb 2023 by JackFrost999
Create a program using pascal to accept the names of Grenada's seven parishes (Carriacou included), number of vaccinated persons, number of unvaccinated persons, and positive cases. The program should calculate and display the total number of...
21 Feb 2023 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
3 Feb 2022 by Member 8816170
I am interested in making a compiler for IEC 61131 Structured Text to target an ARM processor. I want the code generator output to be in C++. Then I plan on using GCC C++ to ARM. I already have C++ code for ARM to act as a runtime.The PC program tool of choice is C# and I was looking at...
1 Jun 2016 by Garth J Lancaster
I'm not sure what (particularly the 2nd sentence) in Quote:Then I plan on using GCC C++ to ARM. I already have C++ code for ARM to act as a runtime. means - can you elaborate ?Certainly I see no real issue using Antlr or COCO/R or ? to take IEC 61131 Structured Text, and build a 'parse...
26 Oct 2016 by integragreg
Have a look at the Eclipse Xtext project. Once you have your grammar defined, you can write a generator pretty easily that will generate the C++ code based on your AST.
11 Apr 2020 by carl1248
I see this is an old post but I thought I would put my ten pence in,,, Get the statement list into post-fix notation. You can then walk through the notation performing actions on the and/or logic. Once you get it into that format you will...
3 Apr 2017 by Member 13102568
I have TButtons which the user can create at runtime. When they are created the button is added to its own TObjectlist depending on which button they create. I believe the list stores all the properties of the button. The first code is where the button is created and added to its own...
17 Aug 2015 by Nafees Hassan
I am making a DLL for creating GUIs and this is how I have planned for it to work:1. Application calls the DLL function to create a form with a button on it2. DLL creates a form in a new thread(so the application doesn't get stuck)3. Application has to show a message whenever(not just...
2 Jan 2016 by Matt Comb
Theres a few ways you could solve this:1. Send a Windows Message back to the mainform and have the mainform listen for it.2. Use sockets e.g. UDP to send a message back to the main application.3. Display the popup message directly from the DLL.
3 Apr 2017 by Member 13102568
I have a form which I need the user to be able to print but I only want a certain region of the form printed. Is there a way I can select a certain region (without the user having to) and only print that? What I have tried: procedure TForm1.Button1Click(Sender: TObject); var printDialog :...
6 Mar 2014 by EbolaHost
we have this problem :'Bessie wants to navigate her spaceship through a dangerous asteroidfield in the shape of an N x N grid (1
6 Mar 2014 by bling
That's a good start. Each time a row is eliminated, it may have also eliminated multiple columns (and vice versa).After each round where Bessie clears a row or column with her cannon, you will need to recompute your row max and column max values. Consider an asteroid map where the first...
1 Oct 2020 by tool__
Last year I finished a project with WPF/C# (with actual help from this forum) that I thought was impossible, with just some 300 lines of code. However I will never observe C# code or any other language as I can observe Pascal, which is the first...
1 Oct 2020 by CPallini
Quote: 1) Is there any version of Pascal out there that will allow me to finish such program? You may try Lazarus[^]. Quote: 2) should I expect any help for this language in this forum? or at all Since it is your favourite language, you're...
22 Mar 2015 by Member 11545132
I'm new to C++, previously I used Pascal. So, I did this exercise in Pascal and I'm interested in the way how this looks in C++. I only know the basic things in C++: arrays, loop stuff etc. Here's the Pascal code:program asd; uses crt; var letters: set of 'A'..'Z'; kar:...
22 Mar 2015 by OriginalGriff
So code it up in C++ and try it out.We'll happily criticise what you did, but we aren't going to convert it for you!
11 Nov 2015 by Member 10852608
Hii have this code here in LUA Scriptfunction myattach(timer) if getProcessIDFromProcessName("Tutorial-i386.exe") ~= nil then object_destroy(timer) openProcess("Tutorial-i386.exe") endendf=createForm(false) --create an invisible...
2 Jan 2016 by Matt Comb
uses Windows, PsAPI, SysUtils;const SE_SECURITY_NAME = 'SeSecurityPrivilege'; PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = $00020000; EXTENDED_STARTUPINFO_PRESENT = $00080000;type PPROC_THREAD_ATTRIBUTE_LIST = Pointer; STARTUPINFOEX = packed...
25 Apr 2016 by Member 11648410
Root: HKLM; Subkey: "SOFTWARE\xxx\yyy"; ValueType: string ; ValueName: "KEYNAME"; ValueData: "{olddata};C:\x\y\z.dllI am using this line of code in inno setup to open the registry path and add a.dll at the enf of the existing data. How to check if the registry value has the dll name which i...
25 Apr 2016 by Jochen Arndt
If you want to check if the key exists and read the current value, you must use Pascal Scripting[^] in the [Code][^] section. However, this requires that you become familiar with the Pascal scripting used by Inno Setup.The function to read a string value from the registry is...
17 Jan 2011 by calvin ruka
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Label1: TLabel; add: TButton; minus: TButton; time: TButton; devide: TButton; Button1: TButton; ...
19 Aug 2016 by TimGallin
The innosetup's wizard UI is too old,i want to create a custompage.I know that i can use CreateCustomPage function or a custom dll to do this till the present moment,but i'm not very familiar with PASCAL and the offical examples are not very complete.Is there someone had made a custom page or...
19 Aug 2016 by Maciej Los
Please, refer Inno Setup Knowledge Base[^]More you can find via Google[^], for example:installer - Custom Page Wizard of Inno Setup - Stack Overflow[^]How can I create my own form or page in an Inno setup based installer? - Stack Overflow[^]Inno Setup custom page - Stack Overflow[^]
12 Jul 2021 by Max Kleiner
We use a Command Line Interface with OpenWeatherMap (PyOWM) to make it easier to use the OpenWeatherMap API in Python.
4 Jan 2018 by Member 13608224
Hi! So i would like to ask if you have any idea how to make a diagonal latin square (i mean a square that has combination of 1..n not only in row and column but also on both diagonal and antidiagonal). I've tried a lot of things but it just doesnt want to work. The worst thing is that i found...
4 Jan 2018 by Maciej Los
You can't expect that someone of us will write a programme to you. Start here: Latin Square -- from Wolfram MathWorld[^]. A diagram which may help you to write programme, you'll find here (pdf)[^]
26 Feb 2019 by tool__
I want to make a simple program executable for windows, i want the program to display a picture and over that picture i want to display some transparent gifs (or whatever file type that supports transparency), and when you klick on that transparent gifs for example, i want to change that gif...
26 Feb 2019 by OriginalGriff
If your background is very old Pascal and HTML, then I wouldn't start with C++ to be honest - I'd start with C# instead. It's a simpler language, which is tightly bound to the .NET framework, which means that what you want to do becomes pretty simple. Create a WinForms app, drop a PictureBox...
26 Feb 2019 by KarstenK
The easiest way is to start with C#. Take a look at this example proejct. For detecting bitmap you can use the mouse click events. tip: take the time to learn the basic for not fizzling around.
26 Feb 2019 by RickZeeland
I agree that C# is a good choice for Windows programming, however as you know Pascal you might also be interested in a Pascal language like Lazarus. Here are some options: https://www.slant.co/topics/5070/~pascal-based-languages-targeting-x86[^] Lazarus is free and open source, in contrast to...
5 Jul 2015 by mr.abzadeh
Hello guys.I have a DLL containing this function:function DCL_Initialize(bDeviceID: Byte; sIP: PAnsiChar): Byte; stdcall external 'DCL.dll';now I want to call this function from C as this(somewhat simplified):#define DLL_EXPORT __declspec(dllexport) __stdcalltypedef char DLL_IMPORT...