ListOfStrings (Subsystem function): Difference between revisions
m (1 revision) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:Subsystem:ListOfStrings subtitle}} | {{Template:Subsystem:ListOfStrings subtitle}} | ||
The <var>ListOfStrings</var> shared function returns a <var>[[Stringlist class|Stringlist]]</var> containing information about | The <var>ListOfStrings</var> shared function returns a <var>[[Stringlist class|Stringlist]]</var> containing information about [[System and Subsystem classes#System and subsystem globals and strings|subsystem strings]]. | ||
==Syntax== | ==Syntax== | ||
{{Template:Subsystem:ListOfStrings syntax}} | {{Template:Subsystem:ListOfStrings syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%sl</th><td>The <var>Stringlist</var> variable that contains the data about the global strings selected according to the <var class="term">nameW</var> and <var class="term">subsysW</var> patterns.</td></tr> | <tr><th>%sl</th><td>The <var>Stringlist</var> variable that contains the data about the global strings selected according to the <var class="term">nameW</var> and <var class="term">subsysW</var> patterns.</td></tr> | ||
<tr><th><var>%(Subsystem)</var></th> | |||
<tr><th><var class="nobr">%(Subsystem)</var></th> | |||
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. <var>ListOfStrings</var> can also be invoked via a <var>Subsystem</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>ListOfStrings</var> can also be invoked via a <var>Subsystem</var> object variable, which may be <var>null</var>.</td></tr> | ||
<tr><th>subsysW</th> | |||
<td>An optional string, which may include wildcard characters, that identifies the associated <var>subsystem</var> of the global strings whose descriptions are returned. This argument defaults to an asterisk (*), that is, all subsystems, and its eligible wildcard characters are the same as those for <var class="term">nameW</var>, above.</td></tr> | |||
<tr><th>nameW</th> | <tr><th>nameW</th> | ||
<td>An optional identifying string which may include wildcard characters. Descriptions of the global strings whose names match the <var class="term">nameW</var> and <var class="term">subsysW</var> patterns are returned to the <var class="term">%sl</var> <var>Stringlist</var>. | <td>An optional identifying string which may include wildcard characters. Descriptions of the global strings whose names match the <var class="term">nameW</var> and <var class="term">subsysW</var> patterns are returned to the <var class="term">%sl</var> <var>Stringlist</var>. | ||
<p>This argument defaults to an asterisk (< | <p> | ||
< | This argument defaults to an asterisk (<tt>*</tt>), that is, all system-wide objects, and its eligible wildcard characters are shown below:</p> | ||
< | <table class="noVar"> | ||
< | <tr><th>*</th> | ||
<td>Matches any group of 0 or more characters</td></tr> | |||
<tr><th>?</th> | |||
<td>Matches any single character</td></tr> | |||
<tr><th>"</th> | |||
<td>An escape, which means the next character is treated literally, even if it is a double quotation mark (<tt>"</tt>), question mark (<tt>?</tt>), or asterisk (<tt>*</tt>)</td></tr> | |||
</table></td></tr> | |||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
<ul><li>All errors result in request cancellation. | <ul> | ||
<li>All errors result in request cancellation. | |||
<li>The <var>Subsystem</var> class <var>ListOfStrings</var> applies to the <var class="term">subsysW</var> argument only; it ignores the current <var>subsystem</var> <var>context</var>. | <li>The <var>Subsystem</var> class <var>ListOfStrings</var> applies to the <var class="term">subsysW</var> argument only; it ignores the current <var>subsystem</var> <var>context</var>. | ||
<li>The items placed on the target <var>Stringlist</var> are put there in no particular order. | <li>The items placed on the target <var>Stringlist</var> are put there in no particular order. | ||
<li>The data returned to the <var>Stringlist</var> is in character format with the following contents: | <li>The data returned to the <var>Stringlist</var> is in character format with the following contents: | ||
< | <dl> | ||
< | <dt>Bytes 1-10 <dd>Userid that last set the global. | ||
< | <dt>Bytes 12-28 <dd>Date and time global last set, in <code>YY/MM/DD HH:MI:SS</code> format. | ||
< | <dt>Bytes 30-53 <dd><Var>Subsystem</var> context for global (<var>Null</var> for <var>system</var> globals). | ||
</ | <dt>Bytes 54- <dd>Global name. | ||
<li>You can map to an image the information in each <var>Stringlist</var> item (described in the previous bullet) as follows: | </dl> | ||
<li>You can map to an image the information in each <var>Stringlist</var> item (described in the previous bullet item) as follows: | |||
<p class="code">image desc | <p class="code">image desc | ||
userid is string len 11 | userid is string len 11 | ||
Line 53: | Line 71: | ||
==Examples== | ==Examples== | ||
The following statement prints the description of all | The following statement prints the description of all subsystem strings:: | ||
<p class="code">%(subsystem):listOfStrings:print</p> | <p class="code">%(subsystem):listOfStrings:print</p> | ||
==See also== | ==See also== | ||
{{Template:Subsystem:ListOfStrings footer}} | {{Template:Subsystem:ListOfStrings footer}} |
Latest revision as of 13:01, 14 May 2016
List of subsystem strings (Subsystem class)
The ListOfStrings shared function returns a Stringlist containing information about subsystem strings.
Syntax
%sl = %(Subsystem):ListOfStrings[( [subsysW], [nameW])]
Syntax terms
%sl | The Stringlist variable that contains the data about the global strings selected according to the nameW and subsysW patterns. | ||||||
---|---|---|---|---|---|---|---|
%(Subsystem) | The class name in parentheses denotes a shared method. ListOfStrings can also be invoked via a Subsystem object variable, which may be null. | ||||||
subsysW | An optional string, which may include wildcard characters, that identifies the associated subsystem of the global strings whose descriptions are returned. This argument defaults to an asterisk (*), that is, all subsystems, and its eligible wildcard characters are the same as those for nameW, above. | ||||||
nameW | An optional identifying string which may include wildcard characters. Descriptions of the global strings whose names match the nameW and subsysW patterns are returned to the %sl Stringlist.
This argument defaults to an asterisk (*), that is, all system-wide objects, and its eligible wildcard characters are shown below:
|
Usage notes
- All errors result in request cancellation.
- The Subsystem class ListOfStrings applies to the subsysW argument only; it ignores the current subsystem context.
- The items placed on the target Stringlist are put there in no particular order.
- The data returned to the Stringlist is in character format with the following contents:
- Bytes 1-10
- Userid that last set the global.
- Bytes 12-28
- Date and time global last set, in
YY/MM/DD HH:MI:SS
format. - Bytes 30-53
- Subsystem context for global (Null for system globals).
- Bytes 54-
- Global name.
- You can map to an image the information in each Stringlist item (described in the previous bullet item) as follows:
image desc userid is string len 11 dateTime is string len 18 subsystem is string len 24 name is string len 255 end image
Note that the image items are one byte longer than the item lengths indicated in the previous bullet. Those bytes would be blank, so standard trailing-blank stripping for image items will cause that extra blank to be stripped. The above image could then be used to map the entries, as follows:
%sl is object stringList %i is float %sl = %(subsystem):listOfStrings prepare image desc %sl:bindImage('DESC') for %i from 1 to %sl:count %sl:getImage(%i) print %desc:userid and %desc:dateTime and - %desc:subsystem and %desc:name end for
Examples
The following statement prints the description of all subsystem strings::
%(subsystem):listOfStrings:print