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

XML Syntax check without DTD

Is there a way for Lazarus Free Pascal to check if a XML Code is well formed without using a DTD? A DTD is really specific but i just want to check if the Syntax is right.
0
votes
1 answer

AsString shows up as undeclared indentifier

function TDM1.fct_login(nom_util, mdp_util: string): boolean; begin ADOQuery1.Parameters.ParamByName('@nom_util').AsString = 'John Smith'; ADOQuery1.Parameters.ParamByName('@mdp_util').AsString = '524462'; ADOQuery1.ExecSQL; Result :=…
Ash
  • 59
  • 6
0
votes
1 answer

LAPJVsp produces infeasible results during augmenting row reduction

In R. Jonker and A. Volgenant, A Shortest Augmenting Path Algorithm for Dense and Sparse Linear Assignment Problems (doi: 10.1007/BF02278710), the authors show that an implementation of their LAPJV algorithm, adapted to sparse graphs and referred to…
0
votes
2 answers

Any solution to having to scroll back up to the top of a program all the time to check variables declared?

I am programming in Pascal (compiling with the Free Pascal IDE) but I imagine the following issue could be in all programming languages, whether you have to declare variables or not. In Pascal you have to declare your variables before you can use…
Seb0029
  • 69
  • 8
0
votes
1 answer

Can't start a server in BlackBox

I'm trying to start a server in BlackBox and so far I have just this MODULE server; IMPORT Dialog,Strings,Win:=WinApi, Server:=CommObxStreamsServer, Stream:=CommStreams; BEGIN Server.Start(); Server.Stop(); END…
0
votes
1 answer

Insert values ordered from least to greatest in an Array

I need to create an array within a register that is a sequence of natural numbers, these are inserted by the user and cannot be repeated. My problem is sorting the array values as they are inserted in ascending order. I have tried this code without…
0
votes
1 answer

Select random elements with guaranteed spacing before choosing the same element again

I want to select random elements from a list without the possibility of repeating the same element twice in a row. I want to have a guaranteed amount of other elements between choosing the same element again. Additionally it has to be impossible to…
0
votes
0 answers

Pascal extension on VSCODE (pascal auto indent)

I'm trying to use pascal on vscode and i had to download some extensions, one of them ('Pascal formatter) what me to config this variables: Indicates the engine app path (required) "pascal.formatter.enginePath": Indicates the configuration file…
0
votes
1 answer

Inno Setup TInputDirWizardPage to not allow UNC path

I have a TInputDirWizardPage to allow the user to pick a backup directory. It automatically allows and error checks the entered paths including UNC paths. The backup directory cannot be a UNC path. How can I make it not allow and error check UNC…
PM2
  • 1
  • 1
0
votes
1 answer

Move Function - Pascal to PHP

Good day, Trust all is well. I want to duplicate the Move function from Pascal to PHP. Here is what I have In Pascal: function Encode(const S: AnsiString): AnsiString; const Map: array [0 .. 63] of Char = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + …
0
votes
1 answer

How can I see VMT in pascal?

Can I see somehow an VMT table in FREE Pascal? I am interested if VMT table has the same number of items in two objects that are connected by heredity? For example in this model, what will be in the VMT table ? And will there be ONE table for all…
0
votes
1 answer

How to not accept special characters in a string on Delphi 10.3

I am trying to write a program for my school-based assignment. It is supposed to accept names as strings, and a salary input as an integer, and tell you whether you are illegible or able to participate in party sections, and repeats until…
Moha
  • 33
  • 5
0
votes
1 answer

How to sort strings by their first char in pascal?

I believe that the question is pretty clear. So, how to sort strings by their first char in pascal? Since as far as I know pascal has no native sorting functions there should be a way to to transfer letters in to digits and then sort them some…
Povylas
  • 776
  • 4
  • 16
  • 31
0
votes
1 answer

Read pascal record from another language

I have an old program that write some pascal record into file : type Character = Record Name : String[50]; Age : integer; end; begin // [..] data contain a Character record AssignFile(f, data); // example Write(f, data); //…
Moarz
  • 53
  • 5
0
votes
1 answer

Pascal. How to insert a word in the middle of a line

Fill the screen with green. Enter a string from the keyboard. Print a line in the center of the screen, inserting the specified word in the middle of it.I need help !I need the word inserted in the middle of the line. How do I do this? uses crt; …
CASERO
  • 1
1 2 3
99
100