String (System function)

From m204wiki
Revision as of 20:38, 1 July 2011 by JALWiccan (talk | contribs) (1 revision)
Jump to navigation Jump to search

Get a system-wide string (System class)

The String read-only property returns the current value of a system-wide string.

Syntax

%value = %(System):String( name)

Syntax terms

%valueThis string is set to the current value of the named string, or it is set to null if the named string is not set.
%(System)The class name in parentheses denotes a ÝÝNotation conventions for methods#Shared methods|shared¨¨ method. String can also be invoked via a System object variable, which may be null.
name A string that identifies the global string to be retrieved.

Examples

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

    print %(system):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