Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Visible to Intel only — GUID: GUID-1EE5420B-4B2B-4147-8D1E-9AD0E767A472

Document Table of Contents

Source Code Useable for All Source Forms

To write source code that is useable for all source forms (free, fixed, or tab), follow these rules:

Blanks

Treat as significant (see Free Source Form).

Statement labels

Place in column positions 1 through 5 (or before the first tab character).

Statements

Start in column position 7 (or after the first tab character).

Comment indicator

Use only !. Place anywhere except in column position 6 (or immediately after the first tab character).

Continuation indicator

Use only &. Place in column position 73 of the initial line and each continuation line, and in column 6 of each continuation line (no tab character can precede the ampersand in column 6).

The following example is valid for all source forms:

Column: 12345678... 73 _________________________________________________________________________ ! Define the user function MY_SIN DOUBLE PRECISION FUNCTION MY_SIN(X) MY_SIN = X - X**3/FACTOR(3) + X**5/FACTOR(5) & & - X**7/FACTOR(7) CONTAINS INTEGER FUNCTION FACTOR(N) FACTOR = 1 DO 10 I = N, 1, -1 10 FACTOR = FACTOR * I END FUNCTION FACTOR END FUNCTION MY_SIN