 |
» |
|
|
 |
Declares entities of type double precision. SyntaxDOUBLE PRECISION [ [, attrib-list] ::] entity-list |
- attrib-list
is a list of one or more of the following attributes,
separated by commas: If attrib-list is present, it must
be followed by the double colon. For information about individual
attributes, see the corresponding statement in this chapter. - entity-list
is a list of entities, separated by commas. Each
entity takes the form: name [( array-spec )] [= initialization-expr] where: name is the name of a variable or function array-spec is a comma-separated list of dimension bounds initialization-expr is a real constant expression that can be evaluated at compile
time. If initialization-expr is present,
entity-list must be preceded by the double
colon.
DescriptionThe DOUBLE
PRECISION statement
is used to declare the properties of real data that has greater
precision than data of default type real. By default, the DOUBLE PRECISION
statement is equivalent to the REAL(KIND=8)
statement. The DOUBLE PRECISION
statement is constrained by the rules for type declaration statements,
including the requirement that it precede all executable statements.
Note, however, that the DOUBLE PRECISION
statement does not have a kind parameter. ExamplesThe following are valid declarations: DOUBLE PRECISION x, y DOUBLE PRECISION, PARAMETER :: pi=3.1415927D0 ! use an array constructor to initialize a double precision array DOUBLE PRECISION, DIMENSION(4) :: dp_vec= & (/4.7D0, 5.2D0, 3.3D0, 2.9D0/) ! use slashes as initialization delimiters, an HP extension DOUBLE PRECISION dp1/5.28D0/, dp2/72.3D0/ ! note, no double colon |
Related statementsREAL Related conceptsFor related information, see the following:
|