Compaq Fortran
User Manual for
OpenVMS Alpha Systems


Previous Contents Index


Appendix C
Compaq Fortran Logical Names

Compaq Fortran recognizes certain logical names at compile-time and run-time.

C.1 Commands for Assigning and Deassigning Logical Names

A logical name specified must not contain brackets, semicolons, or periods. The system treats any name containing these punctuation marks as a file specification, not as a logical name.

To view the previously set logical names, use the SHOW LOGICAL command (see HELP SHOW LOGICAL):


$ SHOW LOGICAL PROJ_DIR 
%SHOW-S-NOTRAN, no translation for logical name PROJ_DIR

Use a DEFINE command to set (define) a logical name:


$ DEFINE logical-name  equivalence-value

For example, to associate the process logical name PROJ_DIR with the directory DISK2:[PROJ], type a DEFINE command:


$ DEFINE PROJ_DIR  DISK2:[PROJ]
$ SHOW LOGICAL PROJ_DIR 
   "PROJ_DIR" = "DISK2:[PROJ]" (LNM$PROCESS_TABLE)

To use logical name tables other than the process table, specify qualifiers to the DEFINE (or ASSIGN) command. A system manager can define logical names system-wide, perhaps in a system startup procedure.

To remove the association of a logical name and its value, use the DEASSIGN command:


$ DEASSIGN logical-name

C.2 Compile-Time Logical Names

Table C-1 describes the logical names that Compaq Fortran recognizes at compile-time.

Table C-1 Compaq Fortran Compile-Time Logical Names
Logical Name Description
FORT$LIBRARY Specifies a default text library to be searched for included library modules (INCLUDE statements that specify library modules) that are not explicitly specified.

FORT$LIBRARY is recognized by both Compaq Fortran 77 and Compaq Fortran.

For more information, see Section 2.2.4.

FORT$INCLUDE Specifies an additional directory to be searched for included source files (INCLUDE statements that specify files). For more information, see Section 2.3.24.

C.3 Run-Time Logical Names

Table C-2 describes the logical names Compaq Fortran recognizes at run-time.

Table C-2 Run-Time Logical Names
Logical Name Description
FORnnn Allows the user to specify the directory and file name at run-time for a logical unit ( nnn) for which the OPEN statement does not specify a file name (leading zeros are required). If the appropriate logical name is not set and the OPEN statement does not specify a file name for that logical unit, a default file name of FOR nnn.DAT is used. For more information, see Section 6.5.1.
FOR$READ Specifies the name of a file to receive input from a READ statement instead of SYS$INPUT. For more information, see Section 6.5.1.
FOR$ACCEPT Specifies the name of a file instead of SYS$INPUT to receive input from an ACCEPT statement. For more information, see Section 6.5.1.
FOR$PRINT Specifies the name of a file instead of SYS$OUTPUT to receive output from a PRINT statement. For more information, see Section 6.5.1.
FOR$TYPE Specifies the name of a file instead of SYS$OUTPUT to receive output from a TYPE statement. For more information, see Section 6.5.1.
FOR$CONVERTnnn For an unformatted file, specifies the nonnative numeric format of the data at run time for a logical unit ( nnn). Otherwise, the nonnative numeric format of the unformatted data must be specified at compile time by using the FORTRAN command /CONVERT qualifier. For more information, see Chapter 9.
FOR$CONVERT.ext
and FOR$CONVERT_ext
For an unformatted file, specifies the nonnative numeric format of the data at run time for a file whose suffix is ext. Otherwise, the nonnative numeric format of the unformatted data must be specified at compile time by using the FORTRAN command /CONVERT qualifier. For more information, see Chapter 9.


Previous Next Contents Index