AppendOpenProcedure (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 lines from procedure to Stringlist</b></span>
{{Template:Stringlist:AppendOpenProcedure subtitle}}


This callable method adds lines to the end of a Stringlist from a procedure opened with $procopn (described in the ''Sirius Functions Reference Manual'').
This callable method adds lines to the end of a Stringlist from a procedure opened with $procopn (described in the ''Sirius Functions Reference Manual'').
Line 5: Line 5:
AppendOpenProcedure is a member of the [[Stringlist class]].
AppendOpenProcedure is a member of the [[Stringlist class]].


==AppendOpenProcedure Syntax==
==Syntax==
<pre>
{{Template:Stringlist:AppendOpenProcedure syntax}}
[%rc =] %sl:AppendOpenProcedure([numlines], [seqincrement])
===Syntax terms===
</pre>
 
===Syntax Terms===
<dl>
<dl>
<dt>%rc<dd>A numeric variable that is set to zero if the function is a success.<dt>%sl<dd>A Stringlist object.<dt>numlines<dd>The number of lines to be read. If this optional argument is not provided, reading continues from the input procedure to the end of that procedure.<dt>seqincrement<dd>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 input lines. </dl>
<dt>%rc<dd>A numeric variable that is set to zero if the function is a success.<dt>%sl<dd>A Stringlist object.<dt>numlines<dd>The number of lines to be read. If this optional argument is not provided, reading continues from the input procedure to the end of that procedure.<dt>seqincrement<dd>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 input lines. </dl>


===Usage Notes===
==Usage notes==
<ul><li>All errors in AppendOpenProcedure result in request cancellation.<li>The '''seqincrement''' argument to AppendOpenProcedure is intended for use in conjunction with the Update (:hdref reftxt=Update refid=slupd.) and Compare (:hdref reftxt=Compare refid=slcomp.) methods.</ul>
<ul><li>All errors in AppendOpenProcedure result in request cancellation.<li>The '''seqincrement''' argument to AppendOpenProcedure is intended for use in conjunction with the Update (:hdref reftxt=Update refid=slupd.) and Compare (:hdref reftxt=Compare refid=slcomp.) methods.</ul>



Revision as of 17:33, 31 December 2010

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 (described in the Sirius Functions Reference Manual).

AppendOpenProcedure is a member of the Stringlist class.

Syntax

[%rc =] sl:AppendOpenProcedure[( [numLines], [seqIncrement])]

Syntax terms

%rc
A 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 continues from the input procedure 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 input 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 (:hdref reftxt=Update refid=slupd.) and Compare (:hdref reftxt=Compare refid=slcomp.) methods.

Examples

In the following example of the AppendOpenProcedure method, procedure SUTPENS_HUNDRED in file JACKSON contains this request:

b
for %i from 1 to 10
print %i
end for
end

The program example follows:

b

%list is object stringList
%rc is float

%list = new

%rc = $procopn('SUTPENS_HUNDRED', 'JACKSON')
%list:appendOpenProcedure(,5000)

%listrint

end

The program result is a print of these lines:

00005000b
00010000for %i from 1 to 10
00015000 print %i
00020000end for
00025000end