next up previous contents
Next: Logical. Up: Declaration of Variables Previous: Double Precision.   Contents


Fortran allows for complex numbers also. They are declared as
complex Z, W  or  
complex :: Z, W
A Fortran complex variable is (and is stored as) a pair of real (single precision floating point) variables (the real and the imaginary part, of course). For example, to declare and initialize the complex constant we use
complex, parameter :: Z=(2.0,3.0)

Adrian Sandu 2001-08-26