! MATHTEST.F90 - Demonstrate the response to error conditions ! on intrinsic math calls and the use of the ! MATHERRQQ subroutine in MATHERR.F90 ! ! Each of these calls generate an error. To trap these errors, ! use the MATHERR.F90 routine included in this directory. ! Compile using: ! df /optimize:0 mathtest.f90 matherr.f90 ! or, if you and previously created a matherr.obj, ! df /optimize:0 mathtest.f90 matherr.obj ! REAL(4) r1, r2 /-1.0/ REAL(8) r3, r4 /-1.0/ COMPLEX(4) c1, c2 /(0.0, 0.0)/ r1 = LOG(r2) r3 = SQRT(r4) c1 = CLOG(c2) WRITE(*, *) r1 WRITE(*, *) r3 WRITE(*, *) c1 END