Programmer Guide/Command Reference/LIST: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}


<var>var</var> := LIST <var>type</var> [ <var>table</var> [ <var>field</var> [ <var>reset</var> ] ] ]
The <code>LIST</command> 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.


The <code>LIST</code> command returns a list of all shell items of the type named by the <code>type</code> argument. If you supply a table item, <code>table</code>, {{STX}} will use this table for storing the item list. Here, <code>table</code> may be either a simple table or an extended table.
== Retrieving a list of shell items ==


<var>var</var> := LIST <var>type</var> <var>table</var> [ <var>field</var> [ <var>reset</var> ] ]


The argument <var>table</var> is the name of a table item where the list result should be stored. Simple tables should be used for lists. If <var>table</var> is an extended table, you can specify which field to store the list in using <var>field</var>. <var>var</var> contains the number of listed items. If no table is specified, the command can be used to count items.
The <code>LIST</code> command retrievs a list of all shell items of the type named by the <code>type</code> argument. It will store this list in the {{STX}} table item <var>table</var>. Here, <var>table</var> may be either a simple table or an extended table. In the latter case, by supplying <var>field</var>, you may choose the field where to store the names of the retrieved shell items.
 
== Counting shell items ==
 
<var>var</var> := LIST <var>type</var>
 
Without any further arguments, the <code>LIST</code> command simply returns the number of shell items of type <var>type</var>.


{|
{|

Revision as of 04:16, 22 April 2011


The LIST</command> 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.

Counting shell items

var := LIST type

Without any further arguments, the LIST command simply returns the number of shell items of type type.

type SPUCODE | SOUNDFILE | CLASS
table target table item
field target field (if table is an extended table)
reset 1 )

Navigation menu

Personal tools