### 3.1.3.4 COMPLEX(16) Constants (VMS, U*X)

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

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

The rules for REAL(16) constants apply to REAL(16) constants used in COMPLEX constants. (See Sections 3.1.2.1 and 3.1.2.4 for the rules on forming REAL(16) constants.)

The REAL(16) constants in a COMPLEX constant have one of the following formats:

- On Tru64 UNIX and Linux systems: IEEE X_floating format
- On OpenVMS systems: Compaq VAX X_floating or IEEE X_floating format (depending on the compiler option specified)

Examples

The following examples demonstrate valid and invalid COMPLEX(16) constants:

Valid |
`(1.7039,-1.7039Q2)` |
`(547.3E0_16,-1.44)` |
`(+12739D3,0.Q0)` |
Invalid | Explanation
`(1.23Q0,)` | Second constant missing.
`(1D1,2H12)` | Hollerith constants not allowed.
`(1.7039,-1.7039D0)` | Neither constant is REAL(16); this is a valid double-precision constant.

For More Information:

- On general rules for complex constants, see Section 3.1.3.1.
- On the format and range of COMPLEX(16) data, see your user manual or programmer's guide.
- On compiler options affecting REAL data, see your user manual or programmer's guide.

Previous Page Next Page Table of Contents