Names identify entities within a Fortran program unit (such as variables, function results, common blocks, named constants, procedures, program units, namelist groups, and dummy arguments). In FORTRAN 77, names were called "symbolic names".
A name can contain letters, digits, an underscore ( _ ),
and the dollar sign ($) special
character. A name can contain up to 31 characters; the first
character must be a letter.
In an executable program, the names of the following entities are global and must be unique in the entire program:
The following examples demonstrate valid and invalid names:
| Valid | |
NUMBER | |
FIND_IT | |
X | |
| Invalid | Explanation |
5Q | Begins with a numeral. |
B.4
| Contains a special character other than _ or $. |
_WRONG | Begins with an underscore. |
For details on the scope of names, see Section 15.1.