31.12.2013 Views

TOPS-20 PASCAL Language Manual - Bitsavers

TOPS-20 PASCAL Language Manual - Bitsavers

TOPS-20 PASCAL Language Manual - Bitsavers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ISO COMPLIANCE<br />

E.2 IMPLEMENTATION-DEPENDENT FEATURES<br />

These language elements are defined by the ISO 7185 standard as<br />

"possibly differing between processors and not necessarily defined for<br />

any particular processor." Following is a description of how <strong>PASCAL</strong>-<strong>20</strong><br />

treats each of these elements.<br />

1. The order of evaluation of array indices is their lexical<br />

order (t.hat is, left to right).<br />

2. The order of evaluation of members of a set constructor is<br />

their lexical order (that is, left to right).<br />

3. The order of evaluation of the operands of a dyadic operator<br />

(for example, '+') depends on the complexity of each operand.<br />

Both operands are always evaluated (even in Boolean<br />

expressions which could be "short-circuited").<br />

4. The order of evaluation, accessing, and binding of actual<br />

parameters to formal parameters in a procedure or function<br />

call is their lexical order (that is, left to right).<br />

5. The varjable in an assignment statement is accessed after the<br />

evaluation of the expression.<br />

6. The effect of reading a file at the point where a PAGE was<br />

executed when writing the file is to return either a<br />

form-feed character (control-L) or the digit '1', depending<br />

on the status of the file when the PAGE was executed. (See<br />

above for a description of PAGE's actions.)<br />

7. Program parameters which are not file variables have no<br />

defined meaning in <strong>PASCAL</strong>-<strong>20</strong>, and cause an error.<br />

E.3 ERROR HANDLING<br />

This section describes how the <strong>PASCAL</strong>-<strong>20</strong> compiler and run-time system<br />

detect violations of level 1 of the standard proposed by the ISO for<br />

the <strong>PASCAL</strong> language. Errors detected at run time cause a program to<br />

terminate and return appropriate error messages. Errors described<br />

here as "not detected" cause a program to produce unexpected results.<br />

The type of an index value is not assignment compatible with the index<br />

type of an array.<br />

Explanation:<br />

Detected at run time if checking was enabled during<br />

compilation.<br />

The current variant changes while a reference to it exists.<br />

Explanation: Not detected. An example of a reference to a<br />

variant is the passing of the variant to a formal<br />

VAR parameter.<br />

IlIJ'he value of a variable to which a pointer refers (p) is NIL.<br />

Explanation:<br />

Detected if checking was enabled at run time.<br />

The val ue of a va r iable to wh ich a po inter refers (p) is undefined.<br />

Explanation:<br />

Not detected.<br />

E-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!