| United States-English |
|
|
|
![]() |
HP Fortran Compiler for HP-UX: HP Fortran Programmer's Reference > Chapter 10 HP
Fortran statementsIMPLICIT |
|
Changes or voids default typing rules. SyntaxThe IMPLICIT statement can take either of the following forms:
DescriptionThe IMPLICIT statement can be used either to change or void the default typing rules within the program unit in which it appears, depending on which of the two forms the statement takes. First form This form of the IMPLICIT statement specifies type as the data type for all variables, arrays, named constants, function subprograms, ENTRY names in function subprograms, and statement functions that begin with any letter in range-list and that are not explicitly given a type. Within the specification statements of a program unit, IMPLICIT statements must precede all other specification statements, except possibly the DATA and PARAMETER statements. The same letter must not appear as a single letter or be included in a range of letters, more than once in all of the IMPLICIT statements in a scoping unit. For information on how the IMPLICIT and PARAMETER statements interact, refer to “PARAMETER (statement and attribute)”. Second form The IMPLICIT NONE statement disables the default typing rules for all variables, arrays, named constants, function subprograms, ENTRY names, and statement functions (but not intrinsic functions). All such objects must be explicitly typed. The IMPLICIT NONE statement must be the only IMPLICIT statement in the scoping unit, and it must precede any PARAMETER statement. Types of intrinsic functions are not affected. You can also use the +implicit_none compile-line option to void the default typing rules. A program compiled with this option may include IMPLICIT statements, which the compiler will honor. ExamplesThe following statement causes all variables and function names beginning with I, J, or K to be of type complex, and all data items beginning with A, B, or C to be of type integer:
Related conceptsFor related information, see the following: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||