up previous next
the length of an object
This function returns the
length of an object, as summarized in
the table below:
----------------------------------------------
| type | length |
-----------------------------------------------|
| STRING | number of bytes in the string |
| LIST | number of items in the list |
----------------------------------------------
The function
len
/**/ len( [2,3,4] );
3
/**/ len( "string" );
6
|
Previously
len
could be applied to other types too; this is no
longer supported. See
NumCompts
for module elements,
NumRows
for matrices, and
NumTerms
for polynomials.