<ABS Example Program>

Program abs_example
  Real :: a(5) = [ 0.0, -0.0, 1.5, -2.5, 3.5 ]
  Integer :: b(2) = [ 1,-1 ]
  Complex, Dimension(3) :: c = [ (3e-30,4e-30),(3,4),(3e30,4e30) ]
  Print 1, Abs(a)
1 Format(1X,'Real: ',5F8.5)
  Print 2, Abs(b)
2 Format(1X,'Integer:',2(1X,I0))
  Print 3, Abs(c)
3 Format(1X,'Complex (Real result):',3(1X,ES12.5))
End Program

■ Execution Results

 Real:  0.00000 0.00000 1.50000 2.50000 3.50000
 Integer: 1 1
 Complex (Real result):  5.00000E-30  5.00000E+00  5.00000E+30