Programmer Guide/Command Reference/ATTRIBUTES: Difference between revisions
From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import) |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
==ATTRIBUTES== | == ATTRIBUTES == | ||
=== Overview === | |||
The <code>ATTRIBUTES</code> command retrieves a blank-separated list of attributes of a shell item, or of variables available in a given context. | |||
=== Usage === | |||
<code>#table := new table * | ;<code>#list := ATTRIBUTES item|MACRO|SHELL|GLOBAL</code>: returns the blank-separated list of all available attributes for the supplied shell item <code>item</code> or a list of variables available: | ||
#list := ATTRIBUTES $#table | :* in the current macro, if <code>ATTRIBUTES MACRO</code> is used; | ||
um 'The item attributes available for a table item are: $#list' | :* in the current shell, if <code>ATTRIBUTES SHELL</code> is used; | ||
delete /Var #list | :* globally, if <code>ATTRIBUTES GLOBAÖ</code> is used. | ||
=== Example === | |||
#table := new table * | |||
#list := ATTRIBUTES $#table | |||
um 'The item attributes available for a table item are: $#list' | |||
delete /Var #list | |||
See also the example script <code>relection.sts</code>. | See also the example script <code>relection.sts</code>. | ||
<!-- C.G. 11.3.2011 --> |
Revision as of 18:07, 11 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 GLOBAÖ
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 #list
See also the example script relection.sts
.