Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

traper(3f) [bsd man page]

TRAPER(3F)																TRAPER(3F)

traper - trap arithmetic errors SYNOPSIS
integer function traper (mask) DESCRIPTION
NOTE: This routine applies only to the VAX. It is ignored on the PDP11. Integer overflow and floating point underflow are not normally trapped during execution. This routine enables these traps by setting status bits in the process status word. These bits are reset on entry to a subprogram, and the previous state is restored on return. Therefore, this routine must be called inside each subprogram in which these conditions should be trapped. If the condition occurs and trapping is enabled, signal SIGFPE is sent to the process. (See signal(3C)) The argument has the following meaning: value meaning 0 do not trap either condition 1 trap integer overflow only 2 trap floating underflow only 3 trap both the above The previous value of these bits is returned. FILES
/usr/lib/libF77.a SEE ALSO
signal(3C), signal(3F) 4.2 Berkeley Distribution May 15, 1985 TRAPER(3F)

Check Out this Related Man Page

TRPFPE(3F)																TRPFPE(3F)

trpfpe, fpecnt - trap and repair floating point faults SYNOPSIS
subroutine trpfpe (numesg, rtnval) double precision rtnval integer function fpecnt () common /fpeflt/ fperr logical fperr DESCRIPTION
NOTE: This routine applies only to Vax computers. It is a null routine on the PDP11. Trpfpe sets up a signal handler to trap arithmetic exceptions. If the exception is due to a floating point arithmetic fault, the result of the operation is replaced with the rtnval specified. Rtnval must be a double precision value. For example, ``0d0'' or ``dflmax()''. The first numesg occurrences of a floating point arithmetic error will cause a message to be written to the standard error file. Any exception that can't be repaired will result in the default action, typically an abort with core image. Fpecnt returns the number of faults since the last call to trpfpe. The logical value in the common block labelled fpeflt will be set to .true. each time a fault occurs. FILES
/usr/lib/libF77.a SEE ALSO
signal(3F), range(3F) BUGS
This routine works only for faults, not traps. This is primarily due to the Vax architecture. If the operation involves changing the stack pointer, it can't be repaired. This seldom should be a problem with the f77 compiler, but such an operation might be produced by the optimizer. The POLY and EMOD opcodes are not dealt with. 4.2 Berkeley Distribution May 15, 1985 TRPFPE(3F)
Man Page

Featured Tech Videos