an open-source digital signal processing and sound synthesis language
about · links · contact
tablelen - return the size of a table from an associated table-handle variable


Synopsis

val = tablelen(table_handle)


Description

tablelen returns the size (length) of the table from the table_handle variable. table_handle is instantiated using the maketable scorefile command.


Arguments

table_handle
The table-handle identifier for the table.


RETURN VALUE

Returns to the script an integer value, the size of the table.


Examples

   table = maketable("literal", "nonorm", 0, 8.00, 8.02, 8.03, 8.05, 8.07)
   size = tablelen(table)

size will have the value 5, corresponding to the 5 elements of the table. This is very useful when a size argument of 0 is used for a maketable("literal", ...) table type.


See Also

maketable, modtable, makefilter, makeconverter, plottable, dumptable, tablelen, mul, div, sub, add, len