String (System function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
(Automatically generated page update)
 
Line 10: Line 10:
<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>
<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>%(System)</var></th>
<tr><th><var class="nobr">%(System)</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>System</var> object variable, which may be <var>null</var>.</td></tr>
<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>System</var> object variable, which may be <var>null</var>.</td></tr>



Latest revision as of 00:27, 16 February 2014

Get a system-wide string (System class)

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

Syntax

%value = %(System):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.
%(System) The class name in parentheses denotes a 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