HP Fortran Programmer's Reference (September 2007)

Data types and data objects
Intrinsic data types
Chapter 5 113
SUBROUTINE x(c)
CHARACTER*(*) :: c
! c assumes the length of the actual argument.
END
! A single entity, of derived type node.
TYPE(node):: list_element
! Declaration and initialization of a user-defined variable
TYPE(coord) :: origin = coord(0.0,0.0)
Implicit typing
In Fortran 90, an entity may be used without having been declared in a type declaration
statement. The compiler determines the type of the entity by applying implicit typing rules.
The default implicit typing rules are:
Names with initial letter A to H or O to Z are of type real.
Names with initial letter I to N are of type integer.
Because Fortran 90 is a case-insensitive language, the same rules apply to both uppercase
and lowercase letters.
The following statements
DIMENSION a(5), i(10)
k = 1
b = k
implicitly declare a and b as default reals and i and k as default integers.
As described in Chapter 10, the IMPLICIT statement enables you to change or cancel the
default implicit typing rules. The IMPLICIT statement takes effect for the scoping unit in
which it appears, except where overridden by explicit type statements.
You can override the implicit typing rules and enforce explicit typing—that is, declare entities
in type declaration statements—with the IMPLICIT NONE statement. If this statement is
included in a scoping unit, all names in that unit must have their types explicitly declared.
You can also enforce explicit typing for all names within a source file by compiling with the
+implicit_none option. This option has the effect of including an IMPLICIT NONE statement
in every program unit within a source file.
For a full description of the IMPLICIT and IMPLICIT NONE statements, see Chapter 10, “HP
Fortran Statements.” The +implicit_none option is described in the HP Fortran
Programmer’s Guide.