06.03.2014 Views

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Directive Enhanced Compilation 14<br />

These directives take the following form:<br />

cDEC$ STRICT<br />

cDEC$ NOSTRICT<br />

c<br />

Is one of the following: C (or c), !, or * (see “Syntax Rules for Compiler Directives”).<br />

Rules and Behavior<br />

If STRICT is specified and no language standard is specified on the command line, the default is<br />

to disable features not found in <strong>Fortran</strong> 90.<br />

The STRICT and NOSTRICT directives can appear only appear at the top of a program unit. A<br />

program unit is a main program, an external subroutine or function, a module, or a block data<br />

program unit. The directives cannot appear between program units, or at the beginning of internal<br />

subprograms. They do not affect any modules invoked with the USE statement in the program unit<br />

that contains them.<br />

Example<br />

Consider the following:<br />

! NOSTRICT by default<br />

TYPE stuff<br />

INTEGER(4) k<br />

INTEGER(4) m<br />

CHARACTER(4) name<br />

END TYPE stuff<br />

TYPE (stuff) examp<br />

DOUBLE COMPLEX cd<br />

cd = (3.0D0, 4.0D0)<br />

examp.k = 4<br />

END<br />

SUBROUTINE STRICTDEMO( )<br />

!DEC$ STRICT<br />

TYPE stuff<br />

INTEGER(4) k<br />

INTEGER(4) m<br />

CHARACTER(4) name<br />

END TYPE stuff<br />

TYPE (stuff) samp<br />

! non-standard data type, no error<br />

! non-standard component designation,<br />

! no error<br />

14-39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!