AppendProcedureList (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 1: Line 1:
<span style="font-size:120%"><b>Add information about procedures</b></span>
{{Template:Stringlist:AppendProcedureList subtitle}}


This callable function returns information about procedures in a procedure file or group into a Stringlist.  
This callable function returns information about procedures in a procedure file or group into a Stringlist.  
Line 7: Line 7:
The AppendProcedureList function accepts three arguments and returns a numeric result.
The AppendProcedureList function accepts three arguments and returns a numeric result.


==AppendProcedureList Syntax==
==Syntax==
<pre>
{{Template:Stringlist:AppendProcedureList syntax}}
[%rc =] %sl:AppendProcedureList(file, [pname], [accnt], [date])
===Syntax terms===
</pre>
 
===Syntax Terms===
<dl>
<dl>
<dt>%rc<dd>A numeric variable that is set to zero if the function is a success; otherwise, it is set to one of these negative error codes:.<dl>
<dt>%rc<dd>A numeric variable that is set to zero if the function is a success; otherwise, it is set to one of these negative error codes:.<dl>
Line 18: Line 15:
All other errors result in request cancellation.<dt>%sl<dd>A Stringlist object.<dt>file<dd>The name of the file or group for which information is to be returned. This is an optional argument, and it defaults to the default file/group at compile time.<dt>pname<dd>The procedure name that is to be selected. The procedure name may contain asterisk (*) characters to indicate wildcard matches. This is an optional parameter, and it defaults to all procedures.<dt>accnt<dd>The account ID of the last modifying user for the procedures to be selected. The account ID may contain asterisk (*) characters to indicate wildcard matches. This is an optional parameter, and it defaults to all account IDs.<dt>date<dd>A string indicating the last modification date for the procedures to be selected. If specified, this parameter must be six bytes long and begin with an equal sign (=), a less-than sign (<), or a greater-than sign (>) to indicate whether the date should be equal to, less than, or greater than, respectively, the Julian date that follows, which is the last five characters. For example, the value <tt>.>03200</tt> selects procedures last modified after day 200 of 2003. This is an optional parameter, and it defaults to all modification dates.<blockquote> This two-digit year date is interpreted with a CENTSPAN of 1975, so values between 00000 and 74365 are considered to be in the year range 2000-2074. :enote </dl>
All other errors result in request cancellation.<dt>%sl<dd>A Stringlist object.<dt>file<dd>The name of the file or group for which information is to be returned. This is an optional argument, and it defaults to the default file/group at compile time.<dt>pname<dd>The procedure name that is to be selected. The procedure name may contain asterisk (*) characters to indicate wildcard matches. This is an optional parameter, and it defaults to all procedures.<dt>accnt<dd>The account ID of the last modifying user for the procedures to be selected. The account ID may contain asterisk (*) characters to indicate wildcard matches. This is an optional parameter, and it defaults to all account IDs.<dt>date<dd>A string indicating the last modification date for the procedures to be selected. If specified, this parameter must be six bytes long and begin with an equal sign (=), a less-than sign (<), or a greater-than sign (>) to indicate whether the date should be equal to, less than, or greater than, respectively, the Julian date that follows, which is the last five characters. For example, the value <tt>.>03200</tt> selects procedures last modified after day 200 of 2003. This is an optional parameter, and it defaults to all modification dates.<blockquote> This two-digit year date is interpreted with a CENTSPAN of 1975, so values between 00000 and 74365 are considered to be in the year range 2000-2074. :enote </dl>


===Usage Notes===
==Usage notes==
'''%sl''', the output Stringlist produced by AppendProcedureList, has the following format:<dl>
'''%sl''', the output Stringlist produced by AppendProcedureList, has the following format:<dl>
<dt>Col 1-10<dd>Account ID of last updater.<dt>Col 12-19<dd>Size of procedure in bytes.<dt>Col 21-30<dd>Date of last update (YYYY/MM/DD).<dt>Col 32-39<dd>Time of last update (BH:MI:SS).<dt>Col 41-48<dd>File containing the procedure.<dt>Col 49-<dd>Procedure name.</dl>
<dt>Col 1-10<dd>Account ID of last updater.<dt>Col 12-19<dd>Size of procedure in bytes.<dt>Col 21-30<dd>Date of last update (YYYY/MM/DD).<dt>Col 32-39<dd>Time of last update (BH:MI:SS).<dt>Col 41-48<dd>File containing the procedure.<dt>Col 49-<dd>Procedure name.</dl>

Revision as of 17:34, 31 December 2010

Add information about procedures to a Stringlist (Stringlist class)


This callable function returns information about procedures in a procedure file or group into a Stringlist.

AppendProcedureList is a member of the Stringlist class.

The AppendProcedureList function accepts three arguments and returns a numeric result.

Syntax

[%rc =] sl:AppendProcedureList( file, [pname], [accnt], [date])

Syntax terms

%rc
A numeric variable that is set to zero if the function is a success; otherwise, it is set to one of these negative error codes:.
-1
File/group not found
-2
No procedures match search criteria
All other errors result in request cancellation.
%sl
A Stringlist object.
file
The name of the file or group for which information is to be returned. This is an optional argument, and it defaults to the default file/group at compile time.
pname
The procedure name that is to be selected. The procedure name may contain asterisk (*) characters to indicate wildcard matches. This is an optional parameter, and it defaults to all procedures.
accnt
The account ID of the last modifying user for the procedures to be selected. The account ID may contain asterisk (*) characters to indicate wildcard matches. This is an optional parameter, and it defaults to all account IDs.
date
A string indicating the last modification date for the procedures to be selected. If specified, this parameter must be six bytes long and begin with an equal sign (=), a less-than sign (<), or a greater-than sign (>) to indicate whether the date should be equal to, less than, or greater than, respectively, the Julian date that follows, which is the last five characters. For example, the value .>03200 selects procedures last modified after day 200 of 2003. This is an optional parameter, and it defaults to all modification dates.

This two-digit year date is interpreted with a CENTSPAN of 1975, so values between 00000 and 74365 are considered to be in the year range 2000-2074. :enote

Usage notes

%sl, the output Stringlist produced by AppendProcedureList, has the following format:

Col 1-10
Account ID of last updater.
Col 12-19
Size of procedure in bytes.
Col 21-30
Date of last update (YYYY/MM/DD).
Col 32-39
Time of last update (BH:MI:SS).
Col 41-48
File containing the procedure.
Col 49-
Procedure name.

Examples

The following program displays information for all procedures in group HOMER beginning with the letter S, last updated by a user whose account ID begins with the letter A.

b

%list is object stringList
%list = new
%list:appendProcedureList('HOMER', 'S*', 'A*')

%list:print

end