Portability Subroutine: Returns the floating-point processor control word.
CALL GETCONTROLFPQQ (controlword)
An exception is disabled if its control bit is set to 1. An exception is enabled if its control bit is cleared to 0. Exceptions can be disabled by setting the control bits to 1 with SETCONTROLFPQQ.
If an exception is disabled, it does not cause an interrupt when it occurs. Instead, floating-point processes generate an appropriate special value (NaN or signed infinity), but the program continues.
You can find out which exceptions (if any) occurred by calling GETSTATUSFPQQ. If errors on floating-point exceptions are enabled (by clearing the control bits to 0 with SETCONTROLFPQQ), the operating system generates an interrupt when the exception occurs. By default, these interrupts cause run-time errors, but you can capture the interrupts with SIGNALQQ and branch to your own error-handling routines.
You can use GETCONTROLFPQQ to retrieve the current control word and SETCONTROLFPQQ to change the control word. Most users do not need to change the default settings.
CALL GETCONTROLFPQQ (control)
!if not rounding down
IF (IAND(control, FPCW$DOWN) .NE. FPCW$DOWN) THEN
control = IAND(control, NOT(FPCW$MCW_RC)) ! clear all
control = IOR(control, FPCW$DOWN) ! set to
! round down