2 errcount - return or set the internal error count
13 An internal variable keeps count of the number of functions
14 evaluating to an error value either internally or by a call to
15 error() or newerror().
17 The errcount() with no args returns the current error count. Calling
18 errcount(num) returns the current error count and resets it to num.
20 If the count exceeds the current value of errmax, execution is aborted
21 with a message displaying the errno for the error.
23 If an error value is assigned to a variable as in:
27 then a function returning that variable does not contribute to
35 ; a = 1/0; b = 2 + ""; c = error(27); d = newerror("a");
36 ; print errcount(), a, errcount(), errmax();
46 errmax, error, strerror, iserror, errno, newerror, errorcodes,
49 ## Copyright (C) 1999-2006 Landon Curt Noll
51 ## Calc is open software; you can redistribute it and/or modify it under
52 ## the terms of the version 2.1 of the GNU Lesser General Public License
53 ## as published by the Free Software Foundation.
55 ## Calc is distributed in the hope that it will be useful, but WITHOUT
56 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
57 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
58 ## Public License for more details.
60 ## A copy of version 2.1 of the GNU Lesser General Public License is
61 ## distributed with calc under the filename COPYING-LGPL. You should have
62 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
63 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
65 ## @(#) $Revision: 30.1 $
66 ## @(#) $Id: errcount,v 30.1 2007/03/16 11:10:42 chongo Exp $
67 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/errcount,v $
69 ## Under source code control: 1997/03/08 08:51:14
70 ## File existed as early as: 1997
72 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
73 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/