2 size - number of elements in value
13 For the different types of value x may have, size(x) is defined as follows:
18 string length of string (not counding the trailing \0)
19 matrix number of elements
20 list number of members
21 association number of (elements, value) pairs
22 object value returned by xx_size(x) if x of type xx
23 file length of the file in octets
28 block numer of octets of data it currently holds
30 named block numer of octets of data it currently holds
33 ; print size(null()), size(3), size(2 - 7i), size("abc")
37 ; print size(M), size(list()), size(list(2,3,4))
41 ; A[1] = 3, A[1,2] = 6, A["three"] = 5
46 ; obj point P = {4,-5}
47 ; define point_size(a) = abs(a.x) + abs(a.y)
58 list, mat, assoc, obj, sizeof, memsize
60 ## Copyright (C) 1999-2006 Landon Curt Noll
62 ## Calc is open software; you can redistribute it and/or modify it under
63 ## the terms of the version 2.1 of the GNU Lesser General Public License
64 ## as published by the Free Software Foundation.
66 ## Calc is distributed in the hope that it will be useful, but WITHOUT
67 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
68 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
69 ## Public License for more details.
71 ## A copy of version 2.1 of the GNU Lesser General Public License is
72 ## distributed with calc under the filename COPYING-LGPL. You should have
73 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
74 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
76 ## @(#) $Revision: 30.1 $
77 ## @(#) $Id: size,v 30.1 2007/03/16 11:10:42 chongo Exp $
78 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/size,v $
80 ## Under source code control: 1994/03/19 03:13:22
81 ## File existed as early as: 1994
83 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
84 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/