String (Subsystem function)

From m204wiki
Jump to navigation Jump to search

Get a subsystem string (Subsystem class)

The String readOnly 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 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

  1. The following statement prints the value of the subsystem string called EMERALDS:

    print %(subsystem):string('EMERALDS')

  2. 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'))

See also