User Tools

Site Tools


tutorials:pascal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:pascal [2024/06/11 14:51]
papa
tutorials:pascal [2024/06/20 05:10] (current)
papa [Hello, World!]
Line 1: Line 1:
-====== Pascal ======+====== The Pascal Compiler ======
  
-The TWENEX.ORG Pascal compiler was developed at Stanford LOTS based on the DECUS PASCAL compiler from Hamburg University.+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 [[tutorials:compilers|standard compile/load/execute commands]] or directly with ''@PASCAL''. The standard extension for Pascal source files is ''.PAS''.+The compiler can be invoked either with the [[tutorials:compilers|standard compile/load/execute commands]] or directly with the EXEC command ''PASCAL''. The standard extension for Pascal source files is ''.PAS''.
  
-Additional information on the LOTS Pascal compiler can be found in ''@HELP PASCAL''. (The help file mentions another Pascal compiler, PASSGO, but it is not available on TWENEX.ORG.) Additional documentation is in the following files in directory ''NEO:<DOCUMENTATION>'' (''DOC:''):+===== Hello, World! ===== 
 + 
 +To create and run a //Hello, World!// program in Pascal: 
 + 
 +<code> 
 +[KANKAN] PUBLIC:<~>@ create hello.pas 
 +</code> 
 + 
 +Your default text editor will start. Enter and save the following: 
 + 
 +<code> 
 +(* Hello program in Pascal *) 
 + 
 +program Hello (Output); 
 +begin 
 + writeln ('Hello, World!'); 
 +end. 
 +</code> 
 + 
 +Return to EXEC then compile and run the program: 
 + 
 +<code> 
 +[KANKAN] PUBLIC:<~>@ execute hello 
 +PASCAL: HELLO 
 +LINK: Loading 
 +[LNKXCT HELLO execution] 
 +OUTPUT     :  
 +Hello, World! 
 +[KANKAN] PUBLIC:<~>@  
 +</code> 
 + 
 +  * 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.DOC
   * PASCAL.HACKER   * PASCAL.HACKER
Line 13: Line 53:
   * PASCAL.USER   * PASCAL.USER
  
-(The following reference documents are for the DEC TOPS-20 PASCAL compiler, which is not installed on TWENEX.ORG, not the LOTS compiler. Although the two compilers differ in some respects, the TOPS-20 compiler documents may provide some useful guidance.) +The following is a reference on the ISO Pascal language standard:
- +
-===== References ===== +
- +
-  * //[[http://bitsavers.org/pdf/dec/pdp10/TOPS20/pascal/AA-L314A-TM_TOPS-20_PASCAL_Primer_Sep83.pdf|TOPS-20 PASCAL Primer]]//, Digital Equipment Corporation, September 1983. +
-  * //[[http://bitsavers.org/pdf/dec/pdp10/TOPS20/pascal/AA-L315A-TM_PASCAL_Language_Manual_Ver_1_Sep83.pdf|TOPS-20 PASCAL Language Manual]]//, Digital Equipment Corporation, September 1983.+
  
 +  * K. Jensen and N. Wirth, //[[http://pascal.hansotten.com/uploads/books/Pascal_User_Manual_and_Report_Fourth_Edition.pdf|Pascal User Manual and Report, 4th ed.]]// New York: Springer-Verlag, 1991. [Accessed: 2024/6/20]
tutorials/pascal.1718117487.txt.gz · Last modified: 2024/06/11 14:51 by papa