/usr/share/calc/help/null is in apcalc-common 2.12.4.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | NAME
null - null value
SYNOPSIS
null([v_1, v_2,...])
TYPES
v_1, v_2,... any
return null
DESCRIPTION
After evaluating in order any arguments it may have, null(...)
returns the null value. This is a particular value, different from
all other types; it is the only value v for which isnull(v) returns
TRUE. The null value tests as FALSE in conditions, and normally
delivers no output in print statements, except that when a list or
matrix is printed, null elements are printed as "NULL".
A few builtin functions may return the null value, e.g.
printf(...) returns the null value; if L = list(), then both
pop(L) and remove(L) return the null value; when successful,
file-handling functions like fclose(fs), fflush(fs), fputs(fs, ...)
return the null value when successful (when they fail they return an
error-value). User-defined functions where execution ends
without a "return" statement or with "return ;" return the null
value.
Missing expressions in argument lists are assigned the null value.
For example, after
define f(a,b,c) = ...
calling
f(1,2)
is as if c == null(). Similarly, f(1,,2) is as if b == null().
(Note that this does not occur in initialization lists; missing
expressions there indicate no change.)
The null value may be used as an argument in some operations, e.g.
if v == null(), then for any x, x + v returns x.
When calc is used interactively, a function that returns the null value
causes no printed output and does not change the "oldvalue". Thus,
null(config("mode", "frac")) may be used to change the output mode
without printing the current mode or changing the stored oldvalue.
EXAMPLE
; L = list(-1,0,1,2);
; while (!isnull(x = pop(L)) print x,; print
-1 0 1 2
; printf("%d %d %d\n", 2, , 3);
2 3
; L = list(,1,,2,)
; print L
list (5 elements, 5 nonzero):
[[0]] = NULL
[[1]] = 1
[[2]] = NULL
[[3]] = 2
[[4]] = NULL
; a = 27
; null(pi = pi(1e-1000))
; .
27
LIMITS
The number of arguments is not to exceed 1024.
LINK LIBRARY
none
SEE ALSO
isnull, test
## Copyright (C) 1999-2006 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.
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## @(#) $Revision: 30.1 $
## @(#) $Id: null,v 30.1 2007/03/16 11:10:42 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/null,v $
##
## Under source code control: 1996/03/12 23:10:01
## File existed as early as: 1996
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|