NOBRKS - count number of times "break" key was hit.

Alternate Entry Name: .NOBRK,_NOBRK

Usage:

B:
   no_of_breaks = nobrks( limit );
C:
   int _nobrk(int limit);

Description:

NOBRKS sets up break-handling to catch breaks and count their occurrences. At each call, the accumulated count of breaks is returned.

If the argument "limit" is a positive integer, the accumulated count is reset to zero and a new limit on the number of breaks is established. If that limit is reached before the count is reset, NOBRKS will take the break action established before the first call to NOBRKS. (Normally this action is to call EXIT.)

Specifying a "limit" value of -1 has the same effect as omitting the "limit" argument. The effect is to return the number of breaks that have occurred, but not to reset the break limit count.

Specifying any other negative value for "limit" has undefined results. If a negative argument is used for the first call to NOBRKS, the function must establish a limit on breaks, so it chooses a default of four.

NOBRKS is intended for use by programs that want to disable the "break" key or postpone action on breaks until some more convenient time. The break-handler which is in effect at the time of the first call to NOBRKS may be re-established by a call of the form "nobrks(0)".

See Also:

expl b lib .cobrk

Copyright © 1996, Thinkage Ltd.