Table of Contents

Previous: -arguments


Option: array

-array=num
Controls the degree of strictness in checking agreement between actual and dummy subprogram arguments that are arrays. The warnings controlled by this setting are for constructions that might legitimately be used by a knowledgeable programmer, but that often indicate programming errors.

The meanings of the setting values are as follows:

0:
only warn about cases that are seldom intentional (see note below).
1:
warn if the arguments differ in their number of dimensions, or if the actual argument is an array element while the dummy argument is a whole array.
2:
warn if both arguments are arrays, but they differ in number of elements.
3:
give both types of warnings.

Default = turn-on = 3.

Note: A warning is always given regardless of this setting if the actual argument is an array while the dummy argument is a scalar variable, or if the actual argument is a scalar variable or expression while the dummy argument is an array. No warning is ever given if the actual argument is an array element while the dummy argument is a scalar variable. Variable-dimensioned arrays and arrays dimensioned with 1 or asterisk match any number of array elements. There is no check of whether multi-dimensional arrays agree in the size of each dimension separately.

See also: -arguments , -library , -usage .


Next: -calltree