Previous: Porting Fortran Up: Porting Fortran Next: Include Files
RTL Differences
When porting a Fortran application, most of the RTL routine calls will need
to be modified slightly, due to the need for an argument list terminator and
the elimination of optional arguments. A portable application must use the
new rules below when calling the RTL. Although following the old calling
conventions instead will work under VMS, they will work only under
VMS. To be portable, the new conventions must be used.
The new RTL calling sequence is described in detail in
Section , RTL Calling Conventions. As a reminder, the
highlights are listed again below.
- Terminator. All RTL routines with keyword-value pairs of optional
arguments must have a terminator in the argument list, even if none of the
optional arguments are used.
- Character strings. All strings input to the RTL must be CHARACTER*n
variables or constants. Formerly, BYTE or LOGICAL*1 arrays were allowed in
RTL arguments, but no longer. BYTE and LOGICAL*1 do not have a string length
indication, and there is no way for the routine to tell whether the argument
is a CHARACTER*n (which does have a length), or a byte array. Since the
length is required, BYTE and LOGICAL*1 no longer work. This applies both
to string arguments and to keywords in the keyword-value pairs, since they
are strings also. The change to CHARACTER*n is going to be most troublesome
with the output routines xvmessage and qprint, since they
are often called with BYTE arrays. See Section , READ &
WRITE to Strings, below, for details on new methods of doing string output.
- Optional arguments. Pure optional arguments are not allowed. Most
routines require all arguments to be specified, but a few have had some
removed. See Table for a list of all the optional argument
routines.