This document is the "TOPS-20 PASCAL Language Manual" (AA-L315A-TM), published in September 1983. It serves as a reference guide for the PASCAL language elements and the PASDDT debugger implemented on the TOPS-20 operating system (versions V3.1 and V4.1), with PASCAL V1.0, LINK V3.1, and RMS V1.2. It is intended for readers already familiar with the PASCAL language.
The manual covers:
- PASCAL Overview: Introduces the language, program structure, lexical elements (character set, reserved words, identifiers, special symbols, delimiters), documentation, and the
%INCLUDE directive.
- Data Types: Details the declaration of scalar (predefined like INTEGER, REAL, BOOLEAN, CHAR; user-defined like enumerated and subrange), structured (arrays, records, sets, files), and pointer types.
- Expressions: Explains arithmetic, relational, logical, and set operators, their precedence, and the scope of identifiers.
- Program Structure & Statements: Describes the program heading, declaration sections (LABEL, CONST, TYPE, VAR, VALUE), and various PASCAL statements, including compound, assignment, conditional (IF-THEN, IF-THEN-ELSE, CASE), repetitive (FOR, REPEAT, WHILE), WITH, GOTO, and procedure calls.
- Procedures and Functions: Covers predeclared and user-declared subprograms, external subprograms, parameters (value, variable, procedure/function, conformant arrays), and modules for separate compilation.
- Input and Output: Provides in-depth information on file characteristics (names, logical names, organization, access, record formats), and specific I/O procedures (CLOSE, FIND, GET, LINELIMIT, OPEN, PAGE, PUT, READ, READLN, RESET, REWRITE, WRITE, WRITELN, and terminal I/O).
- Using PASCAL on TOPS-20: Outlines the program development process (creating, compiling, loading, executing), file specifications, and PASCAL compiler commands and switches.
- PASDDT Debugger: Explains how to run the debugger, use symbolic values and scope, and its commands (ASSIGN, BREAK, CLEAR, DISPLAY, EXIT, HELP, PROCEED, REMOVE, SET, SHOW, TRACE).
PASCAL-20 Extensions: The manual highlights PASCAL-20's extensions to the proposed ISO standard, including:
- Exponentiation operator (
**)
- Hexadecimal, octal, and binary integer constants
- Double-precision real data type
- Dollar sign (
$) and underline (_) in identifiers
- External procedure and function declarations
- Additional functions:
CARD, CLOCK, EXPO, SNGL, UNDEFINED
REM operator
OTHERWISE clause in the CASE statement
- File access procedures:
OPEN, CLOSE, FIND
- Optional carriage control for output files
- Procedures:
DATE, TIME, HALT, LINELIMIT
- Variable initialization
- Separate compilation using
MODULE and the %INCLUDE directive
- Support for calling external FORTRAN subroutines.
Appendices offer further details on PASCAL messages, the ASCII character set, a syntax summary in Backus-Naur Form (BNF), a summary of PASCAL-20 extensions, ISO compliance, differences between PASCAL-20 and VAX-11 PASCAL, and procedure/function calling sequences.