Click here to Skip to main content
15,887,453 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 Updated

Pascal 

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.
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...
18 Oct 2023 by RickZeeland
Make installations simpler with Inno Setup [Tasks]
7 May 2023 by ToughDev
A look at Borland Turbo C/C++
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...
8 Nov 2022 by RickZeeland
Use True for the Exclusive parameter: InputOptionPage := CreateInputOptionPage(wpWelcome, 'DIS_SERVICE SELECTION', '', 'Please select the service', True, False); See: Inno Setup Help[^] Quote: Open the "CodeDlg.iss" script in the "Examples"...
8 Nov 2022 by vijay2022
How to write a function two selection services .for example we have two services, i will select only one service its showing only,but its selecting two. i have to new pascal ,please help me in this What I have tried: ; Script generated by...
2 Nov 2022 by murali 2022
How to pass the multiple parameters at atime through Pascal script What I have tried: ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] AppName=Datastudio ...
1 Nov 2022 by RickZeeland
Example from Inno Setup Help[^] [Run] Filename: "{app}\INIT.EXE"; Parameters: "/x" Your code with a wildcard probably won't work, try like this: Filename: "C:\Users\Administrator\Desktop\Nov 1\myapp.exe"; Parameters: "Password=global" If...
31 Oct 2022 by murali 2022
how to pass the parameter through pascal script,anyone please help (i dont know this is the correct way or not) (my EXE database is database application.once installed the application. we need to login google,enter the used id and password) What...
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[^]
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
20 Apr 2022 by Patrice T
Quote: i am still new to programming and i do not understand how to do this task First step : find documentation about this topic and read it. Then solve the problem by hand with sample datasets. Choose bigger datasets as you progress. This...
20 Apr 2022 by Member 15608247
The chromatic number of an undirected graph is the minimal number colors in which it is possible to color the vertices of the graph in such a way that the vertices connected by an edge the tops were painted in different colors. Determine the...
19 Apr 2022 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...
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 CPallini
public static byte [] getNibbles(UInt32 ui32) { const int Nibbles = 8; byte [] b = new byte[Nibbles]; for ( int n=0; n>= 4; } return 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[^]
11 Nov 2021 by pcurtis456
I use this to connect to a wifi AP and it works. uses …, nduWlanAPI, Windows, nduWlanTypes, … procedure TForm1.Button1Click(Sender: TObject); var hClient: THandle; dwVersion: DWORD; ResultInt: DWORD; pInterface: Pndu_WLAN_INTERFACE_INFO_LIST;...
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.
23 Jun 2021 by Chesandu Charika
I'm currently working on learning JavaScript and Python But My School has a exam about Pascal So If I know JavaScript, Can I learn pascal faster? What I have tried: I Can't think of anything. I was learning two programming languages but now I...
23 Jun 2021 by OriginalGriff
If you are competent in any programming language, then learning another is always a lot quicker as you have the "basic skill set" of analysis, design, coding, testing, and debugging built up to the point where they are automatic - it's just the...
23 Jun 2021 by Richard MacCutchan
Quote: I was learning two programming languages That is generally not a good idea, especially with the two you chose whose syntax is quite different. Now trying to learn Pascal and its syntax will be even more of a challenge. You should only ever...
28 Apr 2021 by rosmary404
I have the answer to this equation in Pascal. Can anyone help me convert this to c or c ++? equation: y1+y2+y3+y4=12 yi ≥ 0 , 0 ≤ i ≤ 4 pascal code (but i cant run it) : program selections3 (input,output); var x1,x2,x3: integer; begin for x1...
28 Apr 2021 by Rick York
This is not a code conversion service but I will give you a hint. The Pascal for loop of this form : for x1 :=0 to 12 do looks like this in c++ : for( x1 = 0; x1
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...
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...
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...
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...
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...
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...
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...
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...
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);
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...
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.
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...
29 Jul 2019 by Martin ISDN
Demystify the inner workings of JavaScript closures
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...
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...
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 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...
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 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...
9 Nov 2018 by Сергей Челноков
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
23 Aug 2018 by Chris Boss
Why some prefer the BASIC language over others
14 Mar 2018 by Laurie Stearn
Does your app create extra files post install? Now clean them up!
7 Jan 2018 by kkdxghlctlcxxtidyuum
Hello, For the past two weeks I've been trying to find a way to apply native icons to my TBitmapButtons. I have been scouring the source code for all of Lazarus' components and have found some relevant functions. However, I don't know how to call these functions. function...
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)[^]
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)[^]
13 Jul 2017 by Sergey Alexandrovich Kryukov
Single-instance application behavior can be considered comprehensive only if all three features are implemented: detection of second instance, passing command line and activation of first instance
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 May 2017 by RandyBuchholz
Chances are you have heard, or even told someone, not to use the Hungarian Notation naming convention. Chances are, you are using it yourself. Hungarian Notation is the king of naming conventions. Though many call for its demise, it is here to stay.
8 May 2017 by Member 12613507
hello guys! i am using Lazarus IDE v.1.6.2 (pascal) running on windows 7 ultimate (32-bit) This is my first time using it and this is my first project. (can't tag lazarus) What I have tried: I tried clicking the "Project" toolbar, then i clicked on "Publish Project ...". I leave the settings...
8 May 2017 by Richard MacCutchan
You need to check the Lazarus documentation. Lazarus Homepage[^]
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...
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 :...
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.
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...
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[^]
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 ...
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...
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...
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 Member 12444738
@ppolymorphe could you help me via skype ?
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...
18 Feb 2016 by Jochen Arndt
Why you are using some kind of DLL to access an USB mouse instead of using the Delphi mouse events that use the Windows API?The mcHID DLL is for accessing USB devices on a low level.I have not used Delphi so far, but a quick research shows that there is an OnMouseMove event. If you need...
18 Feb 2016 by Bessaadnassim
Helloi am using mcHID to interface with USB mouse, i can get Vendor_ID and Product_ID ..etcwhat i can't get is the Notify_read.I can read data only one time when it's plugged.Is there a solution to get mouse position continuously.Thank you.What I have tried:an Interface using...
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...
2 Jan 2016 by Matt Comb
These lines: if aBlocks[ix-1,iy-WIDTHQ] = 9 then BlockNumber := BlockNumber+1; if aBlocks[ix,iy-WIDTHQ] = 9 then BlockNumber := BlockNumber+1; if aBlocks[ix+1,iy-WIDTHQ] = 9 then BlockNumber := BlockNumber+1; if aBlocks[ix-1,iy] = 9 then BlockNumber...
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.
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...
19 Nov 2015 by Axif.Miax
Hi Everyone, Please help me to decode file (.LOL!) or give me any guideline to decode them
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...
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...
17 Aug 2015 by Sergey Alexandrovich Kryukov
When you install Lazarus, you will see DirectX units already in place: http://wiki.freepascal.org/FPC_and_DirectX[^].You can read any DirectX documentation and manuals, just don't try to find it in Pascal and only in Pascal. You can write any code sample in Pascal, just because all the...
17 Aug 2015 by Nafees Hassan
I've been trying to make a game in Lazarus (FPC - FreePascal Compiler) with DirectX9 (http://clootie.ru). But there isn't any documentation. I don't know much of C/C++ so I can't use the C/C++ tutorials out there.My question: where can I find tutorials for using DirectX9 with Pascal?
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...
4 Jul 2015 by Richard MacCutchan
See https://www.sqlite.org/lang_datefunc.html[^]; myDate should be a string value of a date.
4 Jul 2015 by nelson_fonseca
there some way to do it? actually i'am using android studio i have the next code but does not work, not display resultsCursor c = db.rawquery("select * from myTable where strftime('%m',myDate)= '07'",null);
2 Jul 2015 by Frankie-C
You have to simply provide a prototype for the function to call that is equivalent to PASCAL function.In your case it should be:#pragma comment(lib, "DCL.lib")#ifdef __cplusplusextern "C" {#endifchar __declspec(dllimport) WINAPI DCL_Initialize(char bDeviceID, char *sIP);#ifdef...
2 Jul 2015 by E.F. Nijboer
The pascal convention seems to be obsolete. Check here for more info:https://msdn.microsoft.com/en-us/library/wda6h6df.aspx[^]Good luck!