Questions tagged [pascal]

Pascal is an imperative language from the Wirthian family created in 1969. It was widely used in engineering and teaching in the 1970s and 1980s. It lives on in compilers as Free Pascal and Delphi.

Pascal is an influential imperative and procedural programming language, designed in 1969 and published in 1970 by Niklaus Wirth as a small and efficient language. It was largely (but not exclusively) intended to teach students structured programming and data structuring.

Pascal is a descendant of , but it was implemented on a wide range of architectures, from PDP-11s, IBM PCs, to CDC Cyber and IBM System 370 mainframes. Pascal probably reached critical mass around the time Borland released Turbo Pascal in 1983.

Wirth later developed Modula-2 and Oberon and those languages share much of Pascal's design. Other derivatives include OOP-based Object Pascal (used in Delphi and Lazarus/Free Pascal).

Pascal is a purely procedural language and includes control statements with reserved words such as if, then, else, while, for, and so on. However, Pascal also has many data structuring facilities and other abstractions not included in ALGOL 60 like type definitions, records, pointers, enumerations, and sets.

External Resources

Free Pascal/Delphi Programming Books

2598 questions
0
votes
1 answer

Rewrite Pascal for do loop using while do loop

Please how do I rewrite the below FOR....DO loop into a WHILE...DO loop in Pascal programming Below is the following code Program Matmuli(input,output); : : FOR i:=1 TO m DO FOR j:=1 TO p DO BEGIN C[i,j]:= 0.0; FOR…
Browyn Louis
  • 218
  • 3
  • 14
0
votes
0 answers

Can´t use Label in new custom Procedure

I am trying to create a retro text based game in style of Dungeons and Dragons. I encountered problem when I try to display number in Label. It seems that the procedure can´t find the Label from list. I always get: Error: Identifier not found…
mikey_194
  • 29
  • 3
0
votes
0 answers

Fatal: Syntax error, ; expected but identifier TUNJANGAN found

procedure tambahData; begin clrscr; if banyakData
0
votes
1 answer

Pascal code to C# code conversion (ord and chr)

I'm actualy trying to convert pascal code into c# code (we are re-writing old application). Pascal code: function DecryptStr(Source: PChar): string; var st: string; i, k, mask: byte; begin Result := ''; try SetString(st, Source,…
AlexGear
  • 21
  • 2
0
votes
2 answers

Apply multiple filters from multiple comboboxes

I have an adotable and i want to apply multiple filter from multiple coboboxes, each combobox applies a filter to that table. My problem is whenever i choose an item from combobox1 for example it applies its filter but when i choose another item…
0
votes
1 answer

SDL2 reading RGB values of a pixel from psdl_surface

How can i read the RGB values of a pixel from a specified x y position on sdl_surface with Pascal SDL2? I tried finding a solution to this already and found nothing that worked. I tried function get_pixel32(surface: psdl_surface; location: vector2):…
Reinhold
  • 5
  • 2
0
votes
0 answers

Extending class in external library

I need to use an external library which has a class hierarchy, TC1 base, TC2 which derives from TC1, TC3A and TC3B which derive from TC2. I need to extend each class of this hierarchy with some attributes and methods, which will obviously need to be…
simone
  • 1
  • 1
0
votes
1 answer

How to initalize and populate TWideStringDynArray in Pascal?

I am calling a function for SOAP service and one of the required parameters is TWideStringDynArray. How do I initialize and populate this type of array? Or is there another way to convert a normal array to this type? This is how it's defined in SOAP…
UrbanR
  • 202
  • 1
  • 10
0
votes
0 answers

Turbo Pascal result is not visible

can you say to me, where is the error. I wanna write in console the content of the a[i] in every for run. The output could be 6 digits. There is compiler Alert: /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget…
0
votes
0 answers

Get CodeMeter version in inno setup and compare it with a specific version

I want to know if CodeMeter is installed and compare it with a specific version. For that I implemented this function. In my laptop CodeMeter is already installed, but I didn't get its version. function CheckCodeMeterVersion: Boolean; var …
naourez
  • 11
  • 3
0
votes
0 answers

External Program running in different user desktop

I am trying to execute an external program under SYSTEM level and I applied this method (where I only changed the CreateProcessAsSystem('c:\windows\system32\cmd.exe'); to the path of the application I wanted to execute) and it works perfectly as…
Leong
  • 229
  • 2
  • 11
0
votes
2 answers

Best way to get and print formatted datetime?

I am the occasional programmer that mostly uses Pascal and now I have to write some C-programs. I want to print current time in my preferred format and after studying several C-tutorials I come up with: time_t now; struct tm *t; char…
user37342
  • 37
  • 3
0
votes
0 answers

Programmatically checking if a package is installed in the Lazarus IDE

For one of my class libraries I would like to provide a simplified workaround code if a certain package is unavailable. Is there a recommended way to check from code, which packages are installed in the IDE? Compiler or IDE defines would be…
jwdietrich
  • 474
  • 6
  • 17
0
votes
1 answer

Is Pascal used anywhere anymore?

I'm in High School learning Pascal and it's the most frustrating language i've ever coded in, I'm trying to learn other languages like JavaScript and its libraries and frameworks. I just want to know if it's worth learning Pascal or if I should…
Iulian
  • 55
  • 4
0
votes
0 answers

How to handle duplicate TDictionary error

how to handle the error of duplicate value in the list. Values are fed into the input and entered into the list. If there is a duplicate then the value is renamed. eg: procedure TForm2.Button1Click(Sender: TObject); var CollectionNameTable :…