Table of Contents

Previous: -arguments

## Option: array

-array=list
    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. By default, all warnings are turned on.

    The list consists of keywords separated by commas or colons. Since all these warnings are on by default, include a keyword prefixed by no- to turn off a particular warning. There are three special keywords: all to turn on all the warnings about array arguments, none to turn them all off, and help to print the list of all the keywords with a brief explanation of each. If list is omitted, -array is equivalent to -array=all, and -noarray is equivalent to -array=none. The warning keywords with their meanings are as follows:

    dimensions:
      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.
    size:
      warn if both arguments are arrays, but they differ in number of elements.

    For compatibility with previous versions of ftnchek, a numeric form of this setting is also accepted: the list is replaced by a number from 0 to 3. A value of 0 turns all the warnings off, 1 turns on only dimensions, 2 turns on only size, and 3 turns all the warnings on.

    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. These cases are seldom intentional. (To turn off even these warnings, use -arguments=no-arrayness.) 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: -brief