Programmer Guide/Command Reference/ATTRIBUTES: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
=== Usage === | === Usage === | ||
;<code>#list := ATTRIBUTES item|MACRO|SHELL|GLOBAL</code>: returns the blank-separated list of all available attributes for the supplied shell item < | ;<code>#list := ATTRIBUTES <var>item</var>|MACRO|SHELL|GLOBAL</code>: returns the blank-separated list of all available attributes for the supplied shell item <var>item</var> or a list of variables available: | ||
:* in the current macro, if <code>ATTRIBUTES MACRO</code> is used; | :* in the current macro, if <code>ATTRIBUTES MACRO</code> is used; | ||
:* in the current shell, if <code>ATTRIBUTES SHELL</code> is used; | :* in the current shell, if <code>ATTRIBUTES SHELL</code> is used; | ||
Line 17: | Line 17: | ||
#list := ATTRIBUTES $#table | #list := ATTRIBUTES $#table | ||
um 'The item attributes available for a table item are: $#list' | um 'The item attributes available for a table item are: $#list' | ||
delete /Var # | delete /Var #table | ||
See also the example script <code> | See also the example script <code>reflection.sts</code>. | ||
<!-- C.G. 11.3.2011 --> | <!-- C.G. 11.3.2011 --> |
Revision as of 09:21, 23 March 2011
Contents
ATTRIBUTES
Overview
The ATTRIBUTES
command retrieves a blank-separated list of attributes of a shell item, or of variables available in a given context.
Usage
#list := ATTRIBUTES item|MACRO|SHELL|GLOBAL
- returns the blank-separated list of all available attributes for the supplied shell item item or a list of variables available:
- in the current macro, if
ATTRIBUTES MACRO
is used; - in the current shell, if
ATTRIBUTES SHELL
is used; - globally, if
ATTRIBUTES GLOBAL
is used.
- in the current macro, if
Example
#table := new table * #list := ATTRIBUTES $#table um 'The item attributes available for a table item are: $#list' delete /Var #table
See also the example script reflection.sts
.