HP Fortran Programmer's Reference (September 2007)
Language elements
Character set
Chapter 2 41
Character set
The Fortran 90 standard character set, shown in Table 2-1, consists of letters, digits, the
underscore character, and special characters. The HP Fortran character set consists of the
Fortran 90 character set, plus:
• Control characters (Tab, Newline , and Carriage return). Carriage return and Tab are
usually treated as “white space” in a source program. You can use them freely to make the
source easier to read.
• The pound sign (#) character in column 1 to initiate a comment. This is an HP extension
that allows C preprocessor directives embedded in source files to be treated as comments.
• Any other characters in the HP character set listed in Appendix B. These characters may
be used in character constants, character string edit descriptors, comments, and I/O
records.
Lowercase alphabetic characters are equivalent to uppercase characters except when they
appear in character strings or Hollerith constants.
HP Fortran supports only the default character type, CHARACTER(KIND=1), as described in
“Type declaration for intrinsic types” on page 109. Support is provided, however, for Extended
Unix Code (EUC) and Shift-JIS encoding.
Table 2-1 Fortran 90 character set
Category Characters
Letters A to Z, a to z
Digits 0 to 9
Underscore _
Special characters blank (space)
: ! “ % & ; < > ? $
= + - * / ( ) , . '