Programmer Guide/Command Reference/STXCONSTANTS: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (Text replace - "S_TOOLS-STx" to "{{STX}}")
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
==STXCONSTANTS==
<var>var</var> := STXCONSTANTS * | <var>keyword</var> <var>table</var>


<code><var>var</var> := STXCONSTANTS *|<var>keyword</var> <var>table</var></code>
The <code>STXCONSTANT</code> command returns the list of constants supported in {{STX}} dependant on the <var>keyword</var>. If argument <var>table</var> is passed, and is a table, the respective table is emptied, a new entry is added for each constant, and the number of entries is returned. If no table is passed, a space delimited concatenated string of the constants is returned.
 
The <code>STXCONSTANT</code> command returns the list of constants supported in {{STX}} dependant on the <var>keyword</var>. If a <var>table</var> is passed, the <var>table</var> is emptied, a new entry is added for each constant and the number of entries is returned to <var>var</var>. If no table is passed, a space delimited concatenated string of the constants is returned.


Examples:
Examples:


<pre>
#stxConstants := STXCONSTANTS *
#stxConstants := STXCONSTANTS *
</pre>
Returns a blank separated list of constants supported by the <code>VAR STXCONSTANTS</code> command
Returns a blank separated list of constants supported by the <code>VAR STXCONSTANTS</code> command


<pre>
#nConstants := STXCONSTANTS * table         
#nConstants := STXCONSTANTS * table         
Adds all constants supported by the <code>VAR STXCONSTANTS</code> command to the <code>table</code> and stores the number of entries in the variable <code>#nConstants</code>.
</pre>
Adds all constants supported by the <code>VAR STXCONSTANTS</code> command to the <code>table</code> and returns the number of entries to the variable <code>#nConstants</code>.


<pre>
#nColors := STXCONSTANTS COLORS colorTable
#nColors := STXCONSTANTS COLORS colorTable
Adds all supported color constants to the table <code>colorTable</code> and stores the number of entries in <code>#nColors</code>.
</pre>
Adds all supported color constants to the table <code>colorTable</code> and returns the number of entries to <code>#nColors</code>.

Revision as of 21:04, 29 April 2014

var := STXCONSTANTS * | keyword table

The STXCONSTANT command returns the list of constants supported in STx dependant on the keyword. If argument table is passed, and is a table, the respective table is emptied, a new entry is added for each constant, and the number of entries is returned. If no table is passed, a space delimited concatenated string of the constants is returned.

Examples:

#stxConstants := STXCONSTANTS *

Returns a blank separated list of constants supported by the VAR STXCONSTANTS command

#nConstants := STXCONSTANTS * table        

Adds all constants supported by the VAR STXCONSTANTS command to the table and stores the number of entries in the variable #nConstants.

#nColors := STXCONSTANTS COLORS colorTable

Adds all supported color constants to the table colorTable and stores the number of entries in #nColors.

Navigation menu

Personal tools