String (Subsystem function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
Line 7: | Line 7: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%value</th><td>This string is set to the current value of the named string, or it is set to null if the named string is not set.</td></tr> | <tr><th>%value</th><td>This string is set to the current value of the named string, or it is set to null if the named string is not set.</td></tr> | ||
<tr><th><var>%(Subsystem)</var></th><td>The class name in parentheses denotes a ÝÝNotation conventions for methods#Shared methods| | <tr><th><var>%(Subsystem)</var></th><td>The class name in parentheses denotes a ÝÝNotation conventions for methods#Shared methods|shared]] method. <var>String</var> can also be invoked via a <var>Subsystem</var> object variable, which may be <var>null</var>.</td></tr> | ||
<tr><th>name</th> <td>A string that identifies the global string to be retrieved.</td></tr> | <tr><th>name</th> <td>A string that identifies the global string to be retrieved.</td></tr> | ||
</table> | </table> |
Revision as of 21:19, 1 July 2011
Get a subsystem string (Subsystem class)
The String read-only property returns the current value of a Subsystem string.
Syntax
%value = %(Subsystem):String( name)
Syntax terms
%value | This string is set to the current value of the named string, or it is set to null if the named string is not set. |
---|---|
%(Subsystem) | The class name in parentheses denotes a ÝÝNotation conventions for methods#Shared methods|shared]] method. String can also be invoked via a Subsystem object variable, which may be null. |
name | A string that identifies the global string to be retrieved. |
Usage notes
- String retrieves the string for the current subsystem context, which is indicated by the Context property.
Examples
- The following statement prints the value of the subsystem string called EMERALDS:
print %(subsystem):string('EMERALDS')
- A common use of system strings might be to hold a complex shared data-structure in the form of XML. Such a string can be loaded into an XmlDoc object fairly easily:
%sharedDoc is object xmlDoc auto new ... %sharedDoc:loadXml(%(system):string('SharedDoc'))