It is convenient to describe these two statements together as they
have to be closely matched in use. The general form of the
SUBROUTINE statement is:
SUBROUTINE name ( dummy1, dummy2,
The second form just indicates that if there are no arguments then the parentheses are optional.
The symbolic name of the subroutine becomes a global name; it must not be used at all within the program unit and must not be used for any other global item within the entire executable program.
The dummy arguments are also simply symbolic names. The way in which these are interpreted is covered in the next section.
The CALL statement has similar general forms:
CALL name ( arg1, arg2, ...
Again, if there are no arguments the parentheses are optional.
The name must be that of a subroutine (or dummy subroutine). Each arg is an actual argument which can be a variable, array, substring, array element or any form of expression. The permitted forms, which depend on the form of the corresponding dummy argument and how it is used within the subroutine, are fully described in the preceding sections.