Overview
ISO 7185:1990 (formally ISO/IEC 7185:1990) is the international standard that defines the Pascal programming language. The standard specifies precise syntax and execution semantics for core Pascal constructs - notably structured statements, control-flow (case, repeat, while, for), the with-statement, and text I/O procedures (read, readln, write, writeln). ISO 7185:1990 is the authoritative reference for compiler implementers, tool vendors, and organizations maintaining or porting Pascal code.
Key Topics and Requirements
- Structured statements and case operator: formal syntax and semantic examples for case statements and alternatives.
- Repetitive statements: formal definitions for repeat, while, and for statements, including execution rules (e.g., a repeat ... until evaluates its Boolean expression after the statement-sequence so the body executes at least once).
- For-statement constraints:
- The control-variable must be an entire-variable declared in the closest variable-declaration part.
- Control-variable must have an ordinal type; initial and final values must be compatible.
- After normal completion the control-variable becomes undefined (except when left by goto).
- The standard defines what it means for a statement to “threaten” the control-variable and restricts such statements inside the loop or surrounding declarations.
- Equivalence semantics: canonical expansion of for ... to ... do body into temporaries and while loops (both to and downto).
- With-statement semantics:
- Defines how field identifiers are bound to record components and how nested with-statements are equivalent to nested single with constructs.
- Specifies access and lifetime of the reference established by the with.
- Text input/output (I/O):
- Precise syntax and behavior for read, readln, write, writeln when applied to textfiles.
- Rules for parameter types (integer, real, char, boolean, string) and parsing/formatting semantics.
- Detailed formatting rules for write: default field widths, integer/real representations (floating-point and fixed-point modes), string and boolean output, and error conditions.
- read/readln behavior including how input tokens are parsed into integers and reals, and how readln advances to end-of-line.
Applications and Who Uses It
- Compiler and interpreter implementers: implement correct parsing, code generation, and runtime behavior per ISO 7185:1990.
- Language tool and static analysis developers: ensure tools respect Pascal semantics and I/O behavior.
- Legacy system maintainers and porting teams: preserve program behavior across platforms and modernize Pascal code safely.
- Academic and training programs: reference for teaching precise language semantics and structured programming.
Related Standards
- ISO/IEC programming-language standards generally address language definition and portability. implementers often consult other ISO/IEC language standards and regional language extensions when integrating Pascal into toolchains.
Keywords: ISO 7185:1990, ISO/IEC 7185, Pascal standard, Pascal syntax, Pascal I/O, repeat while for, with-statement, read write writeln, programming languages standard.