The character set consists of the following:
Uppercase and lowercase letters, A - Z and a - z
Numerals 0 - 9
Special characters--The following table shows the special characters that are used for punctuation:
Character |
Name |
Usage |
---|---|---|
Space |
Space |
Ignored in statements, except as part of a character constant |
Tab |
Tab | Establish the line as a tab-format source line @ |
= |
Equals |
Assignment |
+ |
Plus |
Add, unary operator |
- |
Minus |
Subtract, unary operator |
* |
Asterisk |
Multiply, alternate returns, comments, exponentiation, stdin, stdout, list-directed I/O |
/ |
Slash |
Divide, delimit data, labeled commons, structures, end-of-record |
( ) |
Parentheses |
Enclose expressions, complex constants, equivalence, parameter, or implicit groups, formats, argument lists, subscripts |
, |
Comma |
Separator for data, expressions, complex constants, equivalence groups, formats, argument lists, subscripts |
. |
Period |
Radix point, delimiter for logical constants and operators, record fields |
' |
Apostrophe |
Quoted character literals |
" |
Quote |
Quoted character literals, octal constants @ |
$ |
Dollar sign |
Delimit namelist input, edit descriptor, directives @ |
! |
Exclamation |
Comments @ |
: |
Colon |
Array declarators, substrings, edit descriptor |
% |
Percent |
Special functions: %REF, %VAL, %LOC @ |
& |
Ampersand |
Continuation, alternate return, delimit namelist input; use in column 1 establishes the line as a tab-format source line @ |
? |
Question mark |
Request names in namelist group@ |
\ |
Backslash |
Escape character @ |
< > |
Angle brackets |
Enclose variable expressions in formats @ |
Note the following usage and restrictions:
Uppercase or lowercase is not significant in the key words of FORTRAN statements or in symbolic names. The -U option of f77 makes case significant in symbolic names.@
Most control characters are allowed as data even though they are not in the character set. The exceptions are: Control A, Control B, Control C, which are not allowed as data. These characters can be entered into the program in other ways, such as with the char() function.@
Any ASCII character is valid as literal data in a character string. @
For the backslash (\) character, you may need to use an escape sequence or use the -xl compiler option. For the newline (\n) character, you must use an escape sequence. See also Table 2-3.