Lahey/Fujitsu Fortran

PARAMETER Statement

Description

The PARAMETER statement specifies and initializes named constants.

Syntax

PARAMETER (named-constant-defs)
Where:

named-constant-defs is a comma separated list of constant-name=init-expr

constant-name is the name of a constant being specified.

init-expr is an expression that can be evaluated at compile time.

Remarks

Each named constant becomes defined with the value of init-expr.

Any data objects defined in a PARAMETER statement cannot be subsequently redefined.

Example

real, parameter :: pi=3.141592654 ! parameter attribute integer :: i0 parameter (i0=0) ! parameter statement