AppendOpenProcedure (Stringlist function): Difference between revisions
Jump to navigation
Jump to search
m (typo) |
m (see also) |
||
Line 25: | Line 25: | ||
In the following example of the <var>AppendOpenProcedure</var> method, procedure <code>SUTPENS_HUNDRED</code> in file <code>JACKSON</code> contains this request: | In the following example of the <var>AppendOpenProcedure</var> method, procedure <code>SUTPENS_HUNDRED</code> in file <code>JACKSON</code> contains this request: | ||
<p class="code"> | <p class="code">begin | ||
begin | |||
for %i from 1 to 10 | for %i from 1 to 10 | ||
print %i | print %i | ||
Line 35: | Line 34: | ||
The program example follows: | The program example follows: | ||
<p class="code"> | <p class="code">begin | ||
begin | |||
%list is object stringList | %list is object stringList | ||
%rc is float | %rc is float | ||
Line 46: | Line 44: | ||
%list:print | %list:print | ||
end | end | ||
</p> | </p> | ||
Line 52: | Line 49: | ||
The program result is a print of these lines: | The program result is a print of these lines: | ||
<p class="output"> | <p class="output">00005000begin | ||
00005000begin | |||
00010000 for %i from 1 to 10 | 00010000 for %i from 1 to 10 | ||
00015000 print %i | 00015000 print %i | ||
Line 59: | Line 55: | ||
00025000end | 00025000end | ||
</p> | </p> | ||
==See also== | ==See also== | ||
{{Template:Stringlist:AppendOpenProcedure footer}} | {{Template:Stringlist:AppendOpenProcedure footer}} |
Revision as of 01:07, 27 January 2011
Add lines from procedure to Stringlist (Stringlist class)
This callable method adds lines to the end of a Stringlist from a procedure opened with $ProcOpn.
Syntax
[%rc =] sl:AppendOpenProcedure[( [numLines], [seqIncrement])]
Syntax terms
%rc | An, optional, numeric variable that is set to zero if the function is a success. |
---|---|
sl | A Stringlist object. |
numLines | The number of lines to be read. If this optional argument is not provided, reading commences from the start of the input procedure if no lines have been read from it, yet; or continues from after the last line read, if data has already been read from the procedure; and continues to the end of that procedure. |
seqIncrement | A sequence number increment for 8-byte sequence numbers to be placed in front of each line in the output Stringlist. This sequence number indicates both the starting sequence number and the sequence number increment. If this parameter is not provided, no sequence numbers are placed in front of the output lines. |
Usage notes
- All errors in AppendOpenProcedure result in request cancellation.
- The seqIncrement argument to AppendOpenProcedure is intended for use in conjunction with the Update and Compare methods.
Examples
In the following example of the AppendOpenProcedure method, procedure SUTPENS_HUNDRED
in file JACKSON
contains this request:
begin for %i from 1 to 10 print %i end for end
The program example follows:
begin %list is object stringList %rc is float %list = new %rc = $procopn('SUTPENS_HUNDRED', 'JACKSON') %list:appendOpenProcedure(,5000) %list:print end
The program result is a print of these lines:
00005000begin 00010000 for %i from 1 to 10 00015000 print %i 00020000 end for 00025000end