1.4 Character Set

Compaq Fortran 77 supports the following characters:

You can use the space character to improve the legibility of a Fortran statement. The compiler ignores all spaces in a statement field except those within a character constant or Hollerith constant; for example, GO TO and GOTO are equivalent.

Printable characters include the tab character (09 hex), those ASCII characters with codes in the range 20(hex) through 7E(hex), and those characters in the DEC Multinational Extension to the ASCII Character Set with codes in the range A1(hex) through FE(hex).

Printable characters that are not in the Fortran character set can only appear in comments, character constants, and Hollerith constants.

The form-feed character (0C hex) is treated as a blank and no diagnostic message is issued. If a source record of length 1 contains a form-feed character, the compilation source listing begins on a new page.

A source record of length 1 containing a Ctrl/Z character (1A hex) is treated as a blank line. Such a record can be created by the ENDFILE statement.

Other nonprintable characters are interpreted as follows:

If you must use a nonprintable character in a character constant, use the CHAR intrinsic function (in conjunction with the concatenation operator, if necessary); for example:

CHARACTER*(*) ESC_BRACKET
PARAMETER (ESC_BRACKET = CHAR(27)//'[')

Normally, uppercase and lowercase letters are treated as equivalent when used to specify program behavior (except in character constants and Hollerith constants). However, on Alpha processors, you can use the compiler option NAMES if you want the compiler to distinguish between uppercase and lowercase letters in external names (such as names of COMMON blocks and subprograms).

For More Information:


Previous Page Next Page Table of Contents