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
68
votes
1 answer

Delphi XE6 link C code in iOS

I've built an App on Android using Delphi XE6 that requires C code. However on iOS I cannot make it work. I suspect the problem is related to arm/thumb status, but I am not sure. There is no problem in either system to call the C code from Pascal.…
38
votes
11 answers

Pascal and its current applications

I studied Turbo Pascal in 1997 and I liked it very much as a language. Everything was very structured and the compiler made sure you did things the right way. I later tried Delphi but never got very interested in it. Since then I've used a lot of…
Andrioid
  • 3,362
  • 4
  • 27
  • 31
37
votes
8 answers

Are there any static code analysis tools for Delphi/Pascal?

Are there any static code analysis tools for Delphi/Pascal? I have seen plenty of options for C++ and .NET, but nothing for Delphi/Pascal. Ideally something that could be integrated into a continuous integration system.
Rob Hunter
  • 2,787
  • 4
  • 35
  • 52
34
votes
2 answers

What are Pascal Strings?

Are they named after the programming language, or the mathematician? What are the defining characteristics of Pascal strings? In Wikipedia's article on strings it seems like the defining characteristic is storing the length of the string in the…
Kayce Basques
  • 23,849
  • 11
  • 86
  • 120
34
votes
5 answers

Object Pascal vs Delphi?

Whats the difference between Object Pascal and Delphi? Are they the same thing? What are the differences and similarities between them and which one is more useful?
Tracing
  • 343
  • 1
  • 3
  • 4
27
votes
1 answer

In Delphi/Free Pascal: is ^ an operator or does it simply denote a pointer type?

In Delphi/Free Pascal: is ^ an operator or does it simply denote a pointer type? Sample code program Project1; {$APPTYPE CONSOLE} var P: ^Integer; begin New(P); P^ := 20; writeln(P^); // How do I read this statement aloud? P is a…
Adam Scott Roan
  • 273
  • 1
  • 3
  • 5
24
votes
19 answers

Does C++ have "with" keyword like Pascal?

with keyword in Pascal can be use to quick access the field of a record. Anybody knows if C++ has anything similar to that? Ex: I have a pointer with many fields and i don't want to type like this: if (pointer->field1) && (pointer->field2) && ...…
user188276
23
votes
10 answers

Declaring Pascal-style strings in C

In C, is there a good way to define length first, Pascal-style strings as constants, so they can be placed in ROM? (I'm working with a small embedded system with a non-GCC ANSI C compiler). A C-string is 0 terminated, eg. {'f','o','o',0}. A…
Joby Taffey
  • 1,129
  • 1
  • 11
  • 17
22
votes
2 answers

Redraw image from 3d perspective to 2d

I need an inverse perspective transform written in Pascal/Delphi/Lazarus. See the following image: I think I need to walk through destination pixels and then calculate the corresponding position in the source image (To avoid problems with rounding…
Kasper DK
  • 557
  • 2
  • 7
  • 17
21
votes
8 answers

What are the advantages of using Virtual Machine compilation (eg. JVM) over natively compiled languages?

I've heard that the advantage of java is that people can write code, compile it for the JVM, and run it anywhere. Each person just needs a JVM app for their platform. Of course, it looks similar to the current situation, where everybody has a…
barlop
  • 12,887
  • 8
  • 80
  • 109
20
votes
2 answers

Xcode 5.0 Error installing command line tools

I just downloaded the last version for Xcode (5.0) and need it develop some Pascal codes on Lazarus. However, the installation requires me to use command line tools, which have a problem downloading. When I click install, the program sends me this…
lazyboy007
  • 249
  • 1
  • 2
  • 11
18
votes
2 answers

What's the preferred Pascal file extension?

Is it: .p .pl .pas .pascal Or something else? And will the various Pascal compilers (notably fpc) bork if you don't use the preferred extension?
mcandre
  • 22,868
  • 20
  • 88
  • 147
18
votes
5 answers

Array begin from 0 or 1 in Delphi 5.0 Pascal?

I want to do an ArrayList in Delphi 5.0. So I found a solution doing this code: var arr: array of String; OK, but every time I add something I do this: var Form1: TForm1; var arr : array of String; procedure TForm1.Button1Click(Sender:…
okami
  • 2,093
  • 7
  • 28
  • 40
18
votes
5 answers

Generic functions for converting an enumeration to string and back

I'm trying to write functions that will convert an enumeration to string and back again. ie: TConversions = class strict private public class function StringToEnumeration(x:String):T; class function…
sav
  • 2,064
  • 5
  • 25
  • 45
18
votes
1 answer

Proper structure syntax for Delphi/Pascal if then begin end and ;

It has been around 20 years since I last had to write in Pascal. I can't seem to use the structure elements of the language correctly where I am nesting if then blocks using begin and end. For example this gets me an Compiler Error "Identifier…
amalgamate
  • 2,200
  • 5
  • 22
  • 44
1
2 3
99 100