Programmer Guide/Command Reference/LIST: Difference between revisions
Line 14: | Line 14: | ||
|- | |- | ||
|type | |type | ||
|a shell item type or <code>MACROCODE</code> | |a shell item type or <code>MACROCODE</code>, <code>SPUCODE</code>, <code>SOUNDFILE</code>, or <code>CLASS</code> | ||
|- | |- | ||
|table | |table | ||
Line 23: | Line 23: | ||
|- | |- | ||
|reset | |reset | ||
|clear target table ( <code>0</code> | |clear target table ( <code>0</code> or <code>1</code> ) | ||
|} | |} | ||
Revision as of 04:21, 22 April 2011
The LIST
may be used for retrieving the list of all shell items of a certain type; of for simply counting how many items of a certain type there are.
Retrieving a list of shell items
var := LIST type table [ field [ reset ] ]
The LIST
command retrievs a list of all shell items of the type named by the type
argument. It will store this list in the STx table item table. Here, table may be either a simple table or an extended table. In the latter case, by supplying field, you may choose the field where to store the names of the retrieved shell items.
You may use the reset argument for implicitly clearing the table item before retrieving the list of shell items, with 1
causing the table to be cleared, and 0
leaving the current contents of the table unharmed, and appending the retrieved item list to the table.
type | a shell item type or MACROCODE , SPUCODE , SOUNDFILE , or CLASS
|
table | target table item |
field | target field (if table is an extended table) |
reset | clear target table ( 0 or 1 )
|
Counting shell items
var := LIST type
Without any further arguments, the LIST
command simply returns the number of shell items of type type.