FORTRAN Reference Manual
Converting Programs to HP FORTRAN
FORTRAN Reference Manual—528615-001
C-4
component name, almost anywhere that you can use a type CHARACTER 
variable.
•
Special characters in symbolic names
Some FORTRAN implementations allow additional characters such as “$” in 
symbolic names, as extensions to the ANSI FORTRAN 77 standard. You can 
usually use an editor to replace all such characters with blanks or an underscore 
character, to make the program acceptable to HP FORTRAN. Using an underscore 
character might help avoid converting a variable whose name includes a “$” to an 
already existing variable name that differs only in that it does not use a “$”.
•
Record lengths
HP FORTRAN requires that all records in a file be the same length, or (for some 
file types) be any length up to the maximum record length that is declared for the 
file. Some FORTRAN implementations allow unformatted READ and WRITE 
statements to have data lists of arbitrary length, with records of different lengths in 
the same file, and possibly with some records exceeding the maximum physical 
record length permitted by the host operating system. Programs that are 
dependent on such a “segmented records” feature might be difficult to convert to 
HP FORTRAN.
•
Initializing data within a type declaration statement
Some FORTRAN implementations allow initialization of data within type declaration 
statements. For example, the statement
REAL PI / 3.1415 9265 3589 7932 /
would be equivalent to the two ANSI FORTRAN 77 statements
REAL PI
DATA PI / 3.1415 9265 3589 7932 /
HP FORTRAN does not support this extension. You can use an editor to replace 
such a statement with two statements, as illustrated above.
•
Initializing variables in common blocks
The ANSI FORTRAN 77 standard and HP FORTRAN require that DATA 
statements that initialize variables in common blocks appear only in BLOCK DATA 
program units. Some FORTRAN implementations allow you to initialize data in 
common blocks in any executable program unit as well. You must move all such 
DATA statements into a separate BLOCK DATA program unit.
•
Octal and hexadecimal constants in source code
The ANSI FORTRAN 77 standard makes no provision for octal or hexadecimal 
constants in source code. HP FORTRAN supports octal constants written as 
%nnnnnn as an extension to the standard. Other FORTRAN implementations also 
allow octal and hexadecimal constants, but use a different notation from that of HP 










