length
length(laot_arg) =>x_result/ 0
Description
Determines the length of a list, array, association table, or string.
The time taken to compute the length depends on the type of object. For example,
Arguments
Value Returned
|
Length of the laot_arg object. (The length is either the number of elements in the list, string, or array or the number of key/value pairs in the association table). |
|
Examples
length( '(a b c d) )
=> 4
z = '(1 2 3)
=> (1 2 3)
length( z )
=> 3
length("hello")
=> 5
declare(a[11])
length( a )
=> 11
myTable = makeTable( "atable" 0)
=> table:atable
myTable[ 'one] = "blue"
=> "blue"
myTable[ "two"] = '(red)
=> (r e d)
length(myTable)
=> 2
Related Topics
Return to top