24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

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.

<strong>Language</strong> <strong>Reference</strong><br />

4.5 Classifying Array Declarators by Array Name<br />

Array declarators can also be classified according to the characteristic of the array name. The following<br />

sections discuss the two classifications.<br />

4.5.1 Actual Array Declarator<br />

An actual array declarator is one in which the array name is not a dummy argument. All actual array<br />

declarators must also be constant array declarators. An actual array declarator is permitted in a<br />

DIMENSION statement, a type statement or a COMMON statement.<br />

4.5.2 Dummy Array Declarator<br />

A dummy array declarator is one in which the array name is a dummy argument and hence can only appear<br />

in a function or subroutine subprogram. It can be a constant, adjustable or assumed-size array declarator.<br />

A dummy array declarator can appear in a DIMENSION statement or a type statement but not in a COMMON<br />

statement. It should be noted that the array declarator for a dummy array declarator need not be the same as<br />

the array declarator of the corresponding actual array declarator. Also note that every array declarator in a<br />

main program must be a constant array declarator.<br />

4.6 Use of Array Names<br />

The appearance of an array name must always be as part of an array element name except in the following<br />

cases:<br />

1. in a list of dummy arguments. For example, a subroutine that has as one of its arguments an<br />

array.<br />

2. in a COMMON statement to define that array as belonging to a common block.<br />

3. in a type statement either as part of an array declarator or by itself to establish the type of the<br />

array.<br />

4. in an array declarator in a DIMENSION, type or COMMON statement.<br />

5. in an EQUIVALENCE statement.<br />

6. in a DATA statement.<br />

7. in the list of actual arguments when calling an external procedure.<br />

8. In the list of an input/output statement.<br />

9. as a unit identifier for an internal file in an input/output statement.<br />

10. as a format identifier in an input/output statement.<br />

11. in a SAVE statement.<br />

164 Use of Array Names

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

Saved successfully!

Ooh no, something went wrong!