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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ISO COMPLIANCE<br />

2. The concept of a "totally-undefined" variable has no meaning<br />

in <strong>PASCAL</strong>-<strong>20</strong>. Any violation of the standard which requires<br />

"totally-undefined" to be meaningful is not detected.<br />

3. Variant records in <strong>PASCAL</strong>-<strong>20</strong> are implemented by overlaying<br />

the fields of the variants in the same memory. Changing the<br />

active variant does not alter the contents of that memory,<br />

and the fields of the newly-active variant are not undefined.<br />

Also, note that variant parts of records cannot be of the<br />

type FILE.<br />

4. The DISPOSE procedure does not cause its argument to become<br />

undefined, but rather the argument is set to NIL.<br />

5. No restrictions on the relative placement of labels and GOTO<br />

statements are enforced.<br />

6. Packed and unpacked sets are implemented in similar ways in<br />

<strong>PASCAL</strong>-<strong>20</strong>. Therefore, the compiler is very "loose" about<br />

interchanging packed and unpacked sets; the only requirement<br />

imposed on compatibility of set types is that their base<br />

types must be compatible.<br />

7. Under certain conditions, a procedure call may be bound to<br />

the wrong procedure definition. This can only happen when<br />

two procedures are declared with the same name at different<br />

levels, and the inner procedure is called before it is<br />

declared. The following example illustrates this situation.<br />

PROCEDURE B;<br />

BEGIN (* level 1 *)<br />

END;<br />

PROCEDURE C;<br />

PROCEDURE D;<br />

BEGIN<br />

B (* call bound to level 1 procedure *)<br />

END;<br />

PROCEDURE B;<br />

BEGIN (* level 2 *)<br />

END;<br />

BEGIN<br />

END;<br />

<strong>PASCAL</strong>-<strong>20</strong> also imposes a number of restrictions on<br />

are:<br />

programs.<br />

These<br />

1. Identifiers may be of any length, but only the first 31<br />

characters are stored. Therefore identifiers in <strong>PASCAL</strong>-<strong>20</strong><br />

must be unique in the first 31 characters.<br />

2. The ordinal values of the base type of a set type are limited<br />

to the range 0 •• 255. This means that no set may have more<br />

than 256 elements.<br />

3. File variables are not permitted as fields in the variant<br />

part of a record.<br />

4. The range of ordinal values of case constants in a CASE<br />

statement must be less than 1000.<br />

E-9

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

Saved successfully!

Ooh no, something went wrong!