The IMPLICIT statement confirms or changes the default type of names.
IMPLICIT type (a[, a]) [, type (a[, a])]
CHARACTER*n (where n must be greater than 0)
COMPLEX*32 u (SPARC only)
DOUBLE COMPLEX u
REAL*16 u (SPARC only)
Either a single letter or a range of single letters in alphabetical order. A range of letters can be specified by the first and last letters of the range, separated by a minus sign.
The different uses for implicit typing and no implicit typing are described here.
The IMPLICIT statement can also indicate that no implicit typing rules apply in a program unit.
An IMPLICIT statement specifies a type and size for all user-defined names that begin with any letter, either a single letter or in a range of letters, appearing in the specification.
An IMPLICIT statement does not change the type of the intrinsic functions.
An IMPLICIT statement applies only to the program unit that contains it.
A program unit can contain more than one IMPLICIT statement.
IMPLICIT types for particular user names are overridden by a type statement.
Compiling with any of the options -dbl, -i2, -r8, or -xtypemap can alter the assumed size of names typed with an IMPLICIT statement that does not specify a size: IMPLICIT REAL (A-Z). See Chapter 2 and the Fortran User's Guide for details.
The second form of IMPLICIT specifies that no implicit typing should be done for user-defined names, and all user-defined names shall have their types declared explicitly.
If either IMPLICIT NONE or IMPLICIT UNDEFINED (A-Z) is specified, there cannot be any other IMPLICIT statement in the program unit.
IMPLICIT statements must precede all other specification statements.
The same letter can appear more than once as a single letter, or in a range of letters in all IMPLICIT statements of a program unit. @
The FORTRAN 77 Standard restricts this usage to only once. For f77, if a letter is used twice, each usage is declared in order. See Example 4.
IMPLICIT INTEGER (A-Z) X = 3 K = 1 STRING = 0
IMPLICIT COMPLEX (U,V,W), CHARACTER*4 (C,S) U1 = ( 1.0, 3.0) STRING = 'abcd' I = 0 X = 0.0
IMPLICIT NONE CHARACTER STR*8 INTEGER N REAL Y N = 100 Y = 1.0E5 STR = 'Length'
In the above example, once IMPLICIT NONE is specified in the beginning. All the variables must be declared explicitly.
IMPLICIT INTEGER (A-Z) IMPLICIT REAL (A-C) C = 1.5E8 D = 9
In the above example, D through Z implies INTEGER, and A through C implies REAL.