Directs the compiler to stop reading statements from the current file and read the statements in the included file or module. When it reaches the end of the included file or module, the compiler resumes compilation with the next statement after the INCLUDE statement. Statement format: INCLUDE 'full-file-name[/[NO]LIST]' INCLUDE '[text-lib] (module-name)[/[NO]LIST]' full-file-name Is a character string that specifies the file to be included. The form of the "full-file-name" must be acceptable to the operating system, as described in the HP Fortran for OpenVMS User Manual. /[NO]LIST Specifies whether the incorporated code is to appear in the compilation source listing. In the listing, a number precedes each incorporated statement. The number indicates the "include" nesting depth of the code. The default is /NOLIST. /LIST and /NOLIST must be spelled completely. On Tru64 UNIX and Linux systems, you can only use /[NO]LIST if you specify the compiler option that sets OpenVMS defaults. text-lib Is a character string that specifies the "full-file-name" of the text library to be searched. Its form must be acceptable to the operating system, as described in the HP Fortran for OpenVMS User Manual. module-name Is the name of the text module, located in a text library, that is to be included. The name of the module must be enclosed in parentheses. It can contain any alphanumeric character and the special characters dollar sign ($) and underscore (_). Its length must be acceptable to the operating system, as described in the HP Fortran for OpenVMS User Manual. The file or module must contain valid Fortran statements. The file or module cannot start with a continuation line, but it can contain an INCLUDE statement. The limit on nesting depth is when system resources are exhausted. In the following example, the file COMMON.FOR defines a parameter constant M, and defines arrays X and Y as part of the blank common block. Main Program File COMMON.FOR File ----------------- --------------- INCLUDE 'COMMON.FOR' PARAMETER (M=100) DIMENSION Z(M) COMMON X(M),Y(M) CALL CUBE DO 5, I=1,M 5 Z(I) = X(I)+SQRT(Y(I)) . . . END SUBROUTINE CUBE INCLUDE 'COMMON.FOR' DO 10, I=1,M 10 X(I) = Y(I)**3 RETURN END