Technical data

Cray Standard C/C++ Reference Manual
5.2 fortran Keyword
Note: The fortran keyword is not allowed in Cray Standard C++.
In extended mode, the identifier fortran is treated as a keyword. It specifies a
storage class that can be used to declare a Fortran-coded external function. The
use of the fortran keyword when declaring a function causes the compiler to
verify that the arguments used in each call to the function are pass-by-address;
any arguments that are not addresses are converted to addresses.
As in any function declaration, an optional type-specifier declares the type
returned, if any. Type int is the default; type void can be used if no value is
returned (by a Fortran subroutine). The fortran storage class causes conversion
of lowercase function names to uppercase, and, if the function name ends with
an underscore character, the trailing underscore character is stripped from the
function name. (Stripping the trailing underscore character is in keeping with
UNIX practice.)
Functions specified with a fortran storage class must not be declared elsewhere
in the file with a static storage class.
An example using the fortran keyword is shown in Section 9.3.7, page 133.
5.3 Hexadecimal Floating-point Constants
The Cray Standard C compiler supports the standard hexadecimal floating
constant notations and the Cray hexadecimal floating constant notation. The
standard hexadecimal floating constants are portable and have sizes that are
dependent upon the hardware. The remainder of this section discusses the
Cray hexadecimal floating constant.
The Cray hexadecimal floating constant feature is not portable, because identical
hexadecimal floating constants can have different meanings on different systems.
It can be used whenever traditional floating-point constants are allowed.
The hexadecimal constant has the usual syntax: 0x (or 0X) followed by
hexadecimal characters. The optional floating suffix has the same form as for
normal floating constants: f or F (for float), l or L (for long), optionally followed
by an i (imaginary).
The constant must represent the same number of bits as its type, which is
determined by the suffix (or the default of double). The constants bit length is
four times the number of hexadecimal digits, including leading zeros.
The following example illustrates hexadecimal constant representation:
106 S217936