User Tools

Site Tools


tutorials:pascal

The Pascal Compiler

The TWENEX.ORG Pascal compiler was originally developed at the University of Hamburg as “DECSystem-10 Pascal”. The compiler was later modified and distributed by Rutgers University with fixes and updates contributed by CMU, Stanford, USC, Sandia National Laboratories and other sites.

The compiler can be invoked either with the standard compile/load/execute commands or directly with the EXEC command PASCAL. The standard extension for Pascal source files is .PAS.

Hello, World!

To create and run a Hello, World! program in Pascal:

[KANKAN] PUBLIC:<~>@ create hello.pas

Your default text editor will start. Enter and save the following:

(* Hello program in Pascal *)

program Hello (Output);
begin
	writeln ('Hello, World!');
end.

Return to EXEC then compile and run the program:

[KANKAN] PUBLIC:<~>@ execute hello
PASCAL:	HELLO
LINK:	Loading
[LNKXCT	HELLO execution]
OUTPUT     : 
Hello, World!
[KANKAN] PUBLIC:<~>@ 
  • Syntax of the EXECUTE command is EXECUTE filename[.extension]. The file extension is optional if you used the standard source file extension (.PAS) and there are no other program source files with the same name in your default directory.
  • At the OUTPUT : prompt, press Enter to direct output to your terminal.

Additional Information

Additional information on the Pascal compiler can be found in HELP PASCAL. (The help file mentions a second Pascal compiler, PASSGO, which is not available on TWENEX.ORG.) Additional documentation is in the following files in directory NEO:<DOCUMENTATION> (DOC:):

  • PASCAL.DOC
  • PASCAL.HACKER
  • PASCAL.INCOMPATIBILITIES-DOC
  • PASCAL.MEM
  • PASCAL.UPDATE
  • PASCAL.USER

The following is a reference on the ISO Pascal language standard:

tutorials/pascal.txt · Last modified: 2024/06/20 05:10 by papa