[UP]


Manual Reference Pages  - include (7)

NAME

include(7f) - [FORTRAN] including source text

CONTENTS

Synopsis
Description
Example

SYNOPSIS

INCLUDE char-literal-constant

DESCRIPTION

Additional text may be incorporated into the source text of a program unit during processing. This is accomplished with the INCLUDE line, which has the form

         INCLUDE char-literal-constant

An INCLUDE line is not a Fortran statement.

The char-literal-constant shall not have a kind type parameter value that is a named-constant. The interpretation of char-literal-constant is processor dependent. An example of a possible valid interpretation is that char-literal-constant is the name of a file that contains the source text to be included.

An INCLUDE line shall appear on a single source line where a statement may appear; it shall be the only nonblank text on this line other than an optional trailing comment. Thus, a statement label is not allowed.

The effect of the INCLUDE line is as if the referenced source text physically replaced the INCLUDE line prior to program processing. Included text may contain any source text, including additional INCLUDE lines; such nested INCLUDE lines are similarly replaced with the specified source text. The maximum depth of nesting of any nested INCLUDE lines is processor dependent. Inclusion of the source text referenced by an INCLUDE line shall not, at any level of nesting, result in inclusion of the same source text.

When an INCLUDE line is resolved, the first included statement line shall not be a continuation line and the last included statement line shall not be continued.

    NOTE

In some circumstances, for example where source code is maintained in an INCLUDE file for use in programs whose source form might be either fixed or free, observing the following rules allows the code to be used with either source form.
* Confine statement labels to character positions 1 to 5 and statements to character positions 7 to 72.
* Treat blanks as being significant.
* Use only the exclamation mark (!) to indicate a comment, but do not start the comment in character position 6.
* For continued statements, place an ampersand (&) in both character position 73 of a continued line and character position 6 of a continuation line.

EXAMPLE


include (7) March 18, 2019
Generated by manServer 1.08 from 94ff5f24-f9fc-4eb1-b7c6-335d358ce2a8 using man macros.