This document is the VAX-11 PASCAL Language Reference Manual, published in October 1982 (Order No. AA-H484C-TE, Software Version VAX-11 PASCAL V2.0). It serves as a reference guide for preparing VAX-11 PASCAL source programs.
The manual describes VAX-11 PASCAL as an extended implementation of the ISO standard PASCAL language, specifically developed for the VAX/VMS operating system. It is primarily intended for PASCAL programmers who may also benefit from some familiarity with VAX/VMS.
Key extensions and features of VAX-11 PASCAL covered include:
- New Data Types:
UNSIGNED for large integers, DOUBLE and QUADRUPLE for extended-precision real numbers, and VARYING OF CHAR for variable-length strings.
- Operators: Addition of an exponentiation operator and
REM for remainder.
- Program Structure & Declarations: Enhanced variable initialization in
VAR sections, an OTHERWISE clause for CASE statements, and flexible declaration sections.
- Routines & Parameters: Extended parameter specifications, including foreign mechanism specifiers, conformant schemas for arrays and strings, and default parameters.
- Input/Output: Comprehensive I/O capabilities supporting sequential, relative, and indexed file organizations, with various predeclared I/O procedures and functions (e.g.,
READV, WRITEV, FINDK, RESETK).
- Compilation Units & Attributes: Support for
MODULEs for independent compilation, and a detailed system of ATTRIBUTES to control properties of data items, routines, and compilation units (e.g., ALIGNMENT, ALLOCATION, CHECK, ENVIRONMENT, INHERIT, KEY, LIST, OPTIMIZE, UNSAFE, VOLATILE).
The manual is structured into 10 chapters covering:
- Introduction: Overview, program structure, lexical elements, comments, and the
%INCLUDE directive.
- Data Types: Detailed information on ordinal, real, structured (RECORD, ARRAY, VARYING OF CHAR, SET, FILE), and pointer types, along with type compatibility rules.
- Expressions: Type conversions, operators (arithmetic, relational, logical, string, set), and precedence.
- The Declaration Section: Label, constant, type, and variable declarations.
- PASCAL Statements: Compound, assignment, empty, conditional (CASE, IF-THEN, IF-THEN-ELSE), repetitive (FOR, REPEAT, WHILE),
WITH, GOTO, and procedure calls.
- Procedures and Functions: Concepts, routine headings, formal parameters, directives (FORWARD, EXTERNAL), and routine calls.
- Predeclared Routines: A comprehensive list of built-in functions and procedures for arithmetic, ordinal, Boolean, type transfer, dynamic allocation, character-string manipulation, unsigned integers, allocation size, low-level interlocked operations, and miscellaneous tasks.
- Input and Output: RMS files, access methods (sequential, direct, keyed), general I/O procedures (OPEN, CLOSE), sequential access I/O, direct access I/O, keyed access I/O, and terminal I/O.
- Compilation Units: Structure of programs and modules, and sharing declarations using global/external identifiers and environment files.
- Attributes: Detailed explanations and rules for all VAX-11 PASCAL attributes.
Appendices provide the ASCII character set, a syntax summary, a summary of predeclared routines, a list of VAX-11 PASCAL extensions, differences between Version 1 and Version 2 of the software, error detection information, implementation-defined features, and program examples.