Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-263
FP_IEEE_EXCEPTIONS_GET_ Procedure
TAL Example
proc DOCOMPUTATION; external;
?nolist
?source $system.system.kfpieee
?list
literal -- return codes for Example
NO_PROBLEM = 0D,
TROUBLE_IN_COMPUTATION = 1D;
int(32) proc Example;
begin
call FP_IEEE_EXCEPTIONS_SET_( 0D ); ! Clear exception bits
call DOCOMPUTATION; ! Routine to do IEEE fp computation
if( FP_IEEE_EXCEPTIONS_GET_ LAND ! test for exceptions
( FP_IEEE_INVALID LOR FP_IEEE_OVERFLOW LOR
FP_IEEE_DIVBYZERO )
) then return( TROUBLE_IN_COMPUTATION );
return( NO_PROBLEM );