Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Fortran 90 Programmer's Reference: HP Fortran 90 Programmer's Reference > Chapter 10 HP Fortran 90 statements

IMPLICIT

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

Changes or voids default typing rules.

Syntax

The IMPLICIT statement can take either of the following forms:

  • First form:

    IMPLICIT type (range-list)[, type (range-list) ,]...
  • Second form:

    IMPLICIT NONE
type

is the data type to be associated with the corresponding letters in range-list.

range-list

is a comma-separated list of letters or ranges of letters (for example, A-Z or I-N) to be associated with type. Writing a range of letters has the same effect as writing a list of single letters.

Description

The 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.

Examples

The 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:

IMPLICIT COMPLEX (I, J, K), INTEGER (A-C)

Related concepts

For related information, see the following:

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.