Dev-Pascal is a Pascal IDE with a single self-extracting file to download. It's a 32-bit GUI IDE but works well on 64-bit Windows 7 and WinXP at least. The default behavior is to run a console-mode Pascal application in a command window, but the compiler will create an executable (.exe) file. Simply put THIS text file into the editor and compile.

Example Program

Pascal- The Pascal language reached its zenith of popularity in the 80's, although it lives on as the dialect of Delphi. It was used in colleges as a language to teach programming and it was used on microcomputers sometimes running the UCSD p-system OS. In the computer lab, students needed to keep track of the manual on p-system. On the IBM-PC, Pascal was wildly popular in the late eighties and early nineties due to a low-cost compiler from Borland called Turbo Pascal and a wonderful book by author Jeff Duntemann called "Complete Turbo Pascal."

It was a contemporary competitor to the C language and Turbo Pascal was really fast, stable and capable. "Coolness" was achieved by such adjuncts as Turtle Graphics and later the Borland Graphics Interface. But the star was Borland's IDE which was simply terrific. Borland included a handy debugger in the IDE and made available industrial-strength tools like Turbo Debugger and Turbo Profiler. These worked equally well with Turbo C and later with the jaw-dropping Turbo C++.

Pascal is not case-sensitive. It encourages self-documenting code and the jump from pseudo-code to standard Pascal syntax seems almost trivial. The block-oriented language is very readable. Ironically, comments are delimited by {braces} and the braces from C correspond to just as many begin/end pairs for each block in Pascal. According to standard Pascal, variables , types etc. are all declared in a prescribed order in the code to facilitate a single pass compile. Sets, enumerated types, sub-ranges, pointer variables, recursion and strong typing are included in the language. One notable and intriguing feature, that is very different from C, is that subroutines (Procedures and Functions) can be nested {supposedly to any extent}.

Full implementation of objects including encapsulation, inheritance, and polymorhism was added in Turbo Pascal version 5.5. DOS was dead not too long after WINDOWS 3.1 came out but DELPHI evolved to keep pace. Most of these compiler products were taken over from Borland and assimilated into a database tool company called Embarcadero.

  1. {Pascal Example Program
  2. Input: An integer, listlen, where listlen is less than
  3. 100, followed by listlen-integer values
  4. Output: The number of input values that are greater than
  5. the average of all input values }
  6. program pasex (input, output);
  7. type intlisttype = array [1..99] of integer;
  8. var
  9. intlist : intlisttype;
  10. listlen, counter, sum, average, result : integer;
  11. begin
  12. result := 0;
  13. sum := 0;
  14. readln (listlen);
  15. if ((listlen > 0) and (listlen < 100)) then
  16. begin
  17. { Read input into an array and compute the sum }
  18. for counter := 1 to listlen do
  19. begin
  20. readln (intlist[counter]);
  21. sum := sum + intlist[counter]
  22. end;
  23. { Compute the average }
  24. average := sum / listlen;
  25. { Count the number of input values that are > average }
  26. for counter := 1 to listlen do
  27. if (intlist[counter] > average) then
  28. result := result + 1;
  29. { Print the result }
  30. writeln ('The number of values > average is:',
  31. result)
  32. end { of the then clause of if (( listlen > 0 ... }
  33. else
  34. writeln ('Error—input list length is not legal')
  35. end.

Readability Example
  1. { submitted by Mickey Lee and Andrew Douglas}
  3. Program PassOrFailSystem;
  5. { The quintessential feature of Pascal is the ability to do nested subroutines
  6. which in Pascal are either Procedures or Functions.
  7. It is not case-sensitive and comments like This one ARE enclosed in braces.
  8. READABILITY is enhanced by the language reading like pseudo code and not too
  9. far from English.
  11. Notice that the inner function "F" is called by the outer function "E" in this
  12. case. Also one should use more descriptive function names in the spirit of
  13. self-documenting code.}
  15. function E(x: real): real;
  16. function F(y: real): real;
  17. begin
  18. F := x + y
  19. end;
  20. begin
  21. E := F(3) + F(4)
  22. end;
  24. Var
  25. ActualMark : Integer;
  26. PossibleMark : Integer;
  27. PercentageMark : Real;
  29. Begin { PassOrFailSystem }
  31. Writeln ('Please type the student''s actual mark: ');
  32. Readln (ActualMark);
  33. Writeln ('Please type the total possible mark of the exam : ');
  34. Readln (PossibleMark);
  35. PercentageMark := (ActualMark / PossibleMark) * 100;
  36. If (PercentageMark = 50) Then
  37. Begin
  38. Writeln;
  39. Writeln ('Pass');
  40. End
  41. Else
  42. Begin
  43. Writeln;
  44. Writeln ('Fail');
  45. End;{ EndIf }
  46. End. { PassOrFailSystem }