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.

PROCEDURES AND FUNCTIONS<br />

Multidimensional arrays can also use conformant array parameters.<br />

fo rma tis:<br />

The<br />

array-id : ARRAY ridlow •• idup : scalar-type idl<br />

OF ARRAY ridlow •. idup : scalar-type idl<br />

OF conformant-array type;<br />

An abbreviated form can also be used<br />

conformant arrays. The format is:<br />

to<br />

define multidimensional<br />

array-id : ARRAY [idlow •• idup : scalar-type id;<br />

i dn •. idn : scalar- type idn; .•• ] OF<br />

conformant-array type;<br />

When a subprogram with conformant-array parameters is called, the IDs<br />

(the bound identifiers) assume the values of the lower and upper bound<br />

values of the actual parameters. These values are those specified in<br />

the definition section of the actual-array parameter.<br />

A conformant-array parameter can have up to one conformant dimension<br />

packed. This means that a one-dimensional conformant-array parameter<br />

can be packed or unpacked. A multidimensional conformant-array<br />

parameter can be unpacked, or its last (rightmost) conformant<br />

dimension can be packed. Note that this restriction applies only to<br />

the conformant part of the parameter; the conformant array type can<br />

be of any type, packed or unpacked.<br />

The components and indices of the actual and formal conformant-array<br />

parameters must be of compatible types. The rules for<br />

conformant-array compatibility are the same as those for other arrays<br />

with one exception. That is, the range of the index types of the<br />

actual-array parameter must be within the range specified for the<br />

formal parameter.<br />

6-26<br />

------------------------------------ ------------

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

Saved successfully!

Ooh no, something went wrong!