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

ID 767251
Date 7/13/2023
Public

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

Document Table of Contents

FREEFORM and NOFREEFORM

General Compiler Directives: FREEFORM specifies that source code is in free-form format. NOFREEFORM specifies that source code is in fixed-form format.

!DIR$ FREEFORM

!DIR$ NOFREEFORM

When the FREEFORM or NOFREEFORM directives are used, they remain in effect for the remainder of the source or include file in which the directive appears, or until the opposite directive is used. When in effect, they apply to include files, but do not affect USE modules, which are compiled separately.

source or include file in which the directive appears

Example

Consider the following:

      SUBROUTINE F (A, NX,NY,I1,I2,J1,J2)
! is in column 1 and fixed form
!     X is in column 7
      REAL (8) :: A (NX,NY)
!DIR$ ASSUME_ALIGNED A:32
!DIR$ FREEFORM          ! what follows is freeform
  !DIR$ ASSUME (MOD(NX,8) .EQ. 0)
  ! ensure that the first array access in the loop is aligned
  !DIR$ ASSUME (MOD(I1,8) .EQ. 1)
    DO J=J1,J2
      DO I=I1,I2
        A(I,J) = A(I,J) + A(I,J+1) + A(I,J-1)
      ENDDO
    ENDDO
  !DIR$ NOFREEFORM            ! and now back to fixed form
       END SUBROUTINE F