Files
calc/help/errmax
2017-05-21 15:38:35 -07:00

67 lines
2.0 KiB
Plaintext

NAME
errmax - return or set maximum error-count before execution stops
SYNOPSIS
errmax([num])
TYPES
num integer
return integer
DESCRIPTION
Without an argument, errmax() returns the current value of an
internal variable errmax. Calling errmax(num) returns this value
but then resets its value to num. Execution is aborted if
evaluation of an error value if this makes errcount > errmax.
An error message displays the errno for the error.
EXAMPLE
> errmax(2)
0
> errcount()
0
> a = 1/0; b = 2 + ""; c = error(27); d = newerror("alpha");
Error 27 caused errcount to exceed errmax
> print c, d
0 0
Here global variables c and d were created when compiling the line
but execution was aborted before the intended assignments to c and d.
LIMITS
0 <= num < 2^32
LINK LIBRARY
none
SEE ALSO
errcount, error, strerror, iserror, errno, newerror, errorcodes
## Copyright (C) 1999 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 29.1 $
## @(#) $Id: errmax,v 29.1 1999/12/14 09:15:47 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/errmax,v $
##
## Under source code control: 1997/03/08 08:51:14
## File existed as early as: 1997
##
## chongo <was here> /\oo/\ http://reality.sgi.com/chongo/
## Share and enjoy! :-) http://reality.sgi.com/chongo/tech/comp/calc/