3.1.3.3 COMPLEX(8) or DOUBLE COMPLEX Constants

A COMPLEX(8) or DOUBLE COMPLEX constant is a pair of constants that represents a complex number. One of the pair must be a double-precision real constant, the other can be an integer, single-precision real, or double-precision real constant.

A COMPLEX(8) or DOUBLE COMPLEX constant occupies 16 bytes of memory and is interpreted as a complex number.

The rules for DOUBLE PRECISION (REAL(8)) constants also apply to the double precision portion of COMPLEX(8) or DOUBLE COMPLEX constants. (See Sections 3.1.2.1 and 3.1.2.3 for the rules on forming DOUBLE PRECISION constants.)

The DOUBLE PRECISION constants in a COMPLEX(8) or DOUBLE COMPLEX constant have one of the following formats:

Examples

The following examples demonstrate valid and invalid COMPLEX(8) or DOUBLE COMPLEX constants:

Valid   
(1.7039,-1.7039D0)    
(547.3E0_8,-1.44_8)    
(1.7039E0,-1.7039D0)    
(+12739D3,0.D0)    
Invalid  Explanation 
(1.23D0,)   Second constant missing. 
(1D1,2H12)   Hollerith constants not allowed. 
(1,1.2)   Neither constant is DOUBLE PRECISION; this is a valid single-precision constant. 

For More Information:


Previous Page Next Page Table of Contents