next up previous contents
Next: Numeric and Logical Declarations Up: Data Objects Previous: Literal Constants

Implicit Typing

Undeclared variables have an implicit type,

Implicit typing is potentially very dangerous and should always be turned off by adding:

    IMPLICIT NONE

as the first line after any USE statements.

Consider,

    DO 30 I = 1.1000
     ...
 30 CONTINUE

in fixed format with implicit typing this declares a REAL variable DO30I and sets it to 1.1000 instead of performing a loop 1000 times!

For more information, click here gif


next up previous contents
Next: Numeric and Logical Declarations Up: Data Objects Previous: Literal Constants

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.