12 After evaluating in order any arguments it may have, null(...)
13 returns the null value. This is a particular value, different from
14 all other types; it is the only value v for which isnull(v) returns
15 TRUE. The null value tests as FALSE in conditions, and normally
16 delivers no output in print statements, except that when a list or
17 matrix is printed, null elements are printed as "NULL".
19 A few builtin functions may return the null value, e.g.
20 printf(...) returns the null value; if L = list(), then both
21 pop(L) and remove(L) return the null value; when successful,
22 file-handling functions like fclose(fs), fflush(fs), fputs(fs, ...)
23 return the null value when successful (when they fail they return an
24 error-value). User-defined functions where execution ends
25 without a "return" statement or with "return ;" return the null
28 Missing expressions in argument lists are assigned the null value.
33 is as if c == null(). Similarly, f(1,,2) is as if b == null().
34 (Note that this does not occur in initialization lists; missing
35 expressions there indicate no change.)
37 The null value may be used as an argument in some operations, e.g.
38 if v == null(), then for any x, x + v returns x.
40 When calc is used interactively, a function that returns the null value
41 causes no printed output and does not change the "oldvalue". Thus,
42 null(config("mode", "frac")) may be used to change the output mode
43 without printing the current mode or changing the stored oldvalue.
47 ; while (!isnull(x = pop(L)) print x,; print
50 ; printf("%d %d %d\n", 2, , 3);
56 list (5 elements, 5 nonzero):
64 ; null(pi = pi(1e-1000))
69 The number of arguments is not to exceed 1024.
77 ## Copyright (C) 1999-2006 Landon Curt Noll
79 ## Calc is open software; you can redistribute it and/or modify it under
80 ## the terms of the version 2.1 of the GNU Lesser General Public License
81 ## as published by the Free Software Foundation.
83 ## Calc is distributed in the hope that it will be useful, but WITHOUT
84 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
85 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
86 ## Public License for more details.
88 ## A copy of version 2.1 of the GNU Lesser General Public License is
89 ## distributed with calc under the filename COPYING-LGPL. You should have
90 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
91 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
93 ## @(#) $Revision: 30.1 $
94 ## @(#) $Id: null,v 30.1 2007/03/16 11:10:42 chongo Exp $
95 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/null,v $
97 ## Under source code control: 1996/03/12 23:10:01
98 ## File existed as early as: 1996
100 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
101 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/