up previous next
len

the length of an object

Syntax
len(E: STRING|LIST): INT

Description
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  


Example
/**/  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.
See Also