1TRAPER(3F) TRAPER(3F)
2
3
4
6 traper - trap arithmetic errors
7
9 integer function traper (mask)
10
12 NOTE: This routine applies only to the VAX. It is ignored on the
13 PDP11.
14
15 Integer overflow and floating point underflow are not normally trapped
16 during execution. This routine enables these traps by setting status
17 bits in the process status word. These bits are reset on entry to a
18 subprogram, and the previous state is restored on return. Therefore,
19 this routine must be called inside each subprogram in which these con‐
20 ditions should be trapped. If the condition occurs and trapping is
21 enabled, signal SIGFPE is sent to the process. (See signal(3C))
22
23 The argument has the following meaning:
24
25 value meaning
26 0 do not trap either condition
27 1 trap integer overflow only
28 2 trap floating underflow only
29 3 trap both the above
30
31 The previous value of these bits is returned.
32
34 /usr/lib/libF77.a
35
37 signal(3C), signal(3F)
38
39
40
414.2 Berkeley Distribution May 15, 1985 TRAPER(3F)