4. Embedded QUEL for Fortran : Fortran Variables and Data Types : Variable and Type Declarations : Constant Declarations
 
Share this page                  
Constant Declarations
To declare constants to EQUEL/Fortran, use the Fortran parameter statement with the following syntax:
UNIX:
parameter (const_name value {const_name value}
VMS:
parameter const_name value {const_name value} 
Windows:
parameter const_name value {const_name value}
or
parameter( const_name value {const_name value}
Syntax Notes:
The data type of const_name derives its data type from the data type of value. Do not put explicit data type declarations in parameter statements. In addition, as with variable declarations, the preprocessor does not assign a data type based on the first letter of const_name.
The value can be a real, integer or character literal. It cannot be an expression or a symbolic name.
The following example declarations illustrate the parameter statement:
UNIX:
C real constant 
parameter (pi = 3.14159 ) 
C integer and real 
parameter (bigint = 2147483648, bgreal = 999999.99)   
VMS:
##  parameter pi = 3.14159   ! real constant 
##  parameter bigint = 2147483648, bgreal = 999999.99
            ! integer and real                        
Windows:
##  parameter pi = 3.14159   ! real constant 
##  parameter(bigint = 2147483648, bgreal = 999999.99)
            ! integer and real