complex :: zs, ys ! simple precision complex (kind = 8) ::zd, yd ! double precisionDans la suite un exemple d'affectation et d'opérations sur les nombres complexes
ys = CMPLX(1.,3.2) ! transforme le couple en complexe yd = CMPLX(1.D0,3.2D0) zd = 2.D0 * yd*yd + yd Print*',ys = ', ys ! affiche ys = (1.,3.2) Print*','Partie reelle de (yd) = ',REAL(yd) Print*','Partie imaginaire de (yd) = ',IMAG(yd)