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

30 Dec 2010 by #realJSOP
We don't do people's homework for them. It's not because we think it's beneath us, but because if YOU don't do it yourself, YOU won't learn anything.
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
15 Mar 2015 by Afzaal Ahmad Zeeshan
No -- this is pretty much off-topic as per this website. Try it yourself.
7 Jun 2011 by ahmadpico
I need help with the program below. I wrote it with pascal lung and, when I compiled it with micro pascal to hex files, there is an error and I need some help to find it.Thank youProgram programme;Var l,i:longint;Label...
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)...
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...
19 Nov 2015 by Axif.Miax
Hi Everyone, Please help me to decode file (.LOL!) or give me any guideline to decode them
4 Apr 2012 by barneyman
looks like you want the Bubble Sort[^]
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...
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...
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...
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; ...
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...
12 Feb 2015 by carlitosd19
I everyone, I want to develop an app on C# but have to look like old console programs like 15 or 20 years ago, with menus, and dialog menus
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 Aug 2018 by Chris Boss
Why some prefer the BASIC language over others
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
18 Sep 2013 by CPallini
There are many options:Google for a ready-to-go expression evaluator in your favourite language, e.g.result of a quick search for 'expression evaluator in C#'[^].Embed a script language (e.g. Lua) in your application.Write your own algorithm for evaluating expressions.Of course the...
21 Jan 2014 by CPallini
Quote:repeatReset(f);until eof(f);This sequence looks wrong to me.
24 Jan 2014 by CPallini
You should report the exact error messages, on order to get help.I tried to compile it with Free Pascal Compiler, getting:filetext.pas(12,13) Error: Incompatible types: got "Char" expected "Int64"filetext.pas(19,10) Error: Illegal qualifierfiletext.pas(20,9) Error: Illegal...
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.
11 Apr 2014 by CPallini
What is the problem of the [100,200] arrangment (or of the opposite one) ?If you access the items in a consistent manner, every arrangment is valid. After all the space is isotropic, isn't it? :-)
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...
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...
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...
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; }
22 Feb 2012 by danikecoz
pascal code to reset the program?
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...
17 Jan 2011 by Dave Kreskowiak
First, nobody is going to just give you code for an entire project.Second, who still uses PASCAL??
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.
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
3 Jun 2014 by E.F. Nijboer
It wouldn't strengthen it. The reason for the random salt is to prevent creating a rainbow table. If you use a derived salt you would weaken the encryption. For example, it would render the result of GetSalt("Foo") to be "Bar". But it would always be "Bar"! There is nothing random about...
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!
1 Mar 2014 by EbolaHost
So I had to solve a problem :given a file that contains N numbers I have to output the largest number that all numbers before it are less than it and all numbers after it are larger than it..if there is no such number the output is 'not found' !so I wrote this code on pascalprogram solar ...
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
10 Apr 2014 by EbolaHost
Say that I have a grid of coordinates...x goes from 0 to 100 and y goes from 0 to 200.I want to store info about each point in an array...however if I declare an array[100,200] the array eill be 100 in height and 200 in width,while the grid is the opposite So at an exercise they want me to...
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...
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....
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...
29 Dec 2013 by hor_313
HiI want to know what is the mean of these operators in pascal language , and what is the equal of them in C language ?Thank you
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)...
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.
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...
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...
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...
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 Oct 2011 by Jose A Pascoa
Still struggling to find the ultimate COFF to OMF converter to link some code with Delphi? You don't need to anymore.
18 Aug 2014 by José Cintra
Some suggestions of algorithms for solving the Pascal Triangle, addressing iterative, recursive and functional paradigms
24 Aug 2014 by José Cintra
Some suggestions of algorithms for computing the Fibonacci numbers addressing iterative, recursive and functional paradigms
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!
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.
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...
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...
25 Jan 2014 by Kornfeld Eliyahu Peter
If the code as you posted, than you have a syntax error (case) here:procedure space;beginRead(f,c[i]);Write(c[i]);end;It should beProcedure space;beginRead(f,c[i]);Write(c[i]);end;
28 Jan 2014 by Kornfeld Eliyahu Peter
Your count array has no dimensions! So assigning values to its element is a memory violation...
14 Mar 2018 by Laurie Stearn
Does your app create extra files post install? Now clean them up!
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...
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{ ...
22 Dec 2012 by lilyNaz
I used SHBrowseFolder instead and everything turned out OK.
30 Dec 2010 by LloydA111
Yes.writeln(22+3/5);
17 Sep 2013 by Lubomur
Text analisator, for example we have input string: "y = (x^2)/2", how can we calculate that in any language(C++, C#, C or Pascal)?Some C++ prototype:...object = new string_analisator_object->set("y = (x^2)/2");...double y = 0;double x = 0;...Ofcourse we know that is a...
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[^]
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)[^]
7 Sep 2022 by Maciej Los
Check this out: https://stackoverflow.com/questions/41222685/how-to-detect-sql-server-installation[^]
30 Dec 2010 by malemar
In this code can I make the number and operation in one line such as 22+3/5=:confused:and I want introduction, Purpose and conclusion :rolleyes: program calculator_in_pascal;var x : integer; num1 , num2 , ms , amo : real; ope , ord : char; cho : string;begin num1...
30 Dec 2010 by Manfred Rudolf Bihy
This person thinks that you've got yourself a calculater that doesn't even consider operator precedence. Applied to input 22+3/5 the outcomeiswriteln(((22+3)/5));which is quite different from:writeln((22+(3/5)));That's what I think!Cheers,Manfred
29 Jul 2019 by Martin ISDN
Demystify the inner workings of JavaScript closures
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.
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
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...
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.
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.
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...
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...
7 Nov 2014 by Member 10526961
The following is the code for a minesweeper project. In the ApplyBlocks procedure, I want to check all adjacent blocks (blocks are stored in a two-dim array as coordinates), and if any are bombs (or = 9), then increase there value by 1. Unfortunately I can not get this to cork and I do not...
21 Jan 2014 by Member 10538783
Hello, well, the following program opens a file and reads the first two strings that exist in the first line into two variables. The problem is that I’ve been trying to see what’s wrong with the following program, but I can’t see why it’s not working.The compiler compiles it without any...
21 Jan 2014 by Member 10538783
I wrote it like that, so as to open the file once, only in the main program, there it is.Program num;Varf:Text;b,g:String;c:String[1];Procedure thenum (a:String);BeginAssign(f,'textfileoffile.txt');Reset(f);a:='A';while not eof(f) and (a' ') dobeginRead...
22 Jan 2014 by Member 10538783
Thank you very much, the program now, works without any problem at all.
24 Jan 2014 by Member 10538783
Hello, well i've been trying to make a program a program that will read from a text file the first num. of the firs line, and then will do a certain procedure, that means a procedura that will read the other nums. into arrays, as many times as the value of the first num is. This is the program...
25 Jan 2014 by Member 10538783
Hello, can anyone help me with the following program? The problem seems to be in variable c, but it doesn't seems wrong to me. Can anyone please help me?The text that the program reads is like this3 21 21 31 2Where 3 is n , so the procedure the program must be done 3 times, so...
28 Jan 2014 by Member 10538783
Hello, i have to make this program, but i still haven't finished it and i need some help. This is what i have to do. Make a program in Pascal that after has read a text with a list of nums., it will return the numb. of the nums that appear less than one times in the text.The text that will...
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 Member 10538783
Hi, i have to do the following thing. Make a program in Pascal that after has read a text with a list of nums., it will return the numb. of the nums that appear less than one times in the text.The text that will be read from the program should be like that.In the first line there are...
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...
3 Jan 2015 by Member 11350283
please help me to get it !although the pseudocode is enough for me .
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:...
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...
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 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 ...
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...
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 :...
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...
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...
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...
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...
31 Jul 2011 by Member 8125122
pascal programming screen design codes