
D. Haugli Aer E 160 Aerospace Engineering
2/4/2005 IMPLICIT NONE, Page 1 Iowa State University
IMPLICIT NONE
The IMPLICIT NONE statement forces the compiler to accept only variables and constants that
have been declared. The compiler will issue an a fatal error if you forget to declare a variable
(usually something like, “ This name does not have a type, and must have an explicit type”).
The IMPLICIT NONE statement prevents the compiler from assuming a type. If the statement is
not included, FORTRAN will assume that variables and constants that start with the letters i, j, k,
l, m or n integers. FORTRAN will assume that variables and constants that start with other
letters are REAL. These assumptions can create problems such as accidental integer division or
attempting to assign text (normally CHARACTER) to a numerical data type (REAL or INTEGER).
Therefore, always use IMPLICIT NONE.
The correct placement for the statement is immediately following the PROGRAM, SUBROUTINE or
FUNCTION statement. The only exception is if a module USE statement is required.
Example 1. IMPLICIT NONE with no USE statement:
PROGRAM <insert program name here>
IMPLICIT NONE
.
.
.
Example 2. IMPLICIT NONE with USE statement:
PROGRAM <insert program name here>
USE <insert module name here>
IMPLICIT NONE
.
.
.