SIZE Function
Returns a vector containing
size and type information for the given expression.
Usage
result
= SIZE(
expr
)
Input Parameters
expr
The expression to be evaluated.
Returned Value
result
A vector containing size and type information for
expr
.
Keywords
Dimensions
Returns a longword vector containing the size of each dimension of
expr
.
Nelements
Returns the total number of elements in
expr
.
Ndimensions
Returns the number of dimensions in
expr
. A zero is returned if
expr
is scalar.
Type
Returns the type code of
expr
.
Discussion
The returned vector is of longword type. It has the following form:
[
D
,
S
1
,
S
2
, ...,
S
p
,
T
,
E
]
where
D
is the number of dimensions of EXPRESSION (zero if EXPRESSION is scalar or undefined);
S
i
is the size of dimension
i
(not present if EXPRESSION is scalar or undefined);
T
is the type code, encoded as shown in the table below; and
E
is the number of elements in EXPRESSION.
Type Code
Data Type
0
Undefined
1
Byte
2
Integer
3
Longword integer
4
Floating point
5
Double precision floating
6
Complex single-precision floating
7
String
8
Structure
9
UPVAR (the variable type pointed to by UPVAR)
10
List
11
Associative array
12
Complex double-precision floating
See Also
N_ELEMENTS
,
N_PARAMS
,
N_TAGS
,
TAG_NAMES
doc@boulder.vni.com
Copyright © 1999, Visual Numerics, Inc. All rights reserved.