$ProcCls: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(26 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Close procedure before reaching end</span>
<span class="pageSubtitle">Close procedure before reaching end</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $ProcCls function.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $ProcCls function.</p>


The <var>$ProcCls</var> function may be used to "close" a procedure before reaching its end.  
The <var>$ProcCls</var> function may be used to "close" a procedure before reaching its end.  


The <var>$ProcCls</var> function accepts no arguments and returns a numeric result. As of <var class="product">[[Sirius Mods]]</var> Version 6.8, it is a callable $function.
The <var>$ProcCls</var> function accepts no arguments and returns a numeric result. It is a [[Calling Sirius Mods $functions|callable]] $function.


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $ProcCls
<p class="syntax"><span class="term">%result</span> = $ProcCls
<section end="syntax" /></p>
<p class="caption">$ProcCls Function
</p>
</p>
<p class="caption">%RESULT is set to indicate the results of the function.</p>


If <var>$ProcCls</var> is called before the current procedure has been completely processed, the current procedure is closed and the next [[$ProcGet]], [[$ProcDat]], or [[$ProcLoc]] call operates on the previous procedure, if any. <var>$ProcCls</var> will not close an input stream that was not open via [[$ProcOpn]].
<p>
<var class="term">%result</var> is set to indicate the results of the function.</p>


The following instructions close all procedure input streams opened by $ProcOpn.
===Return codes===
<p class="code"> REPEAT UNTIL %RESULT <= 0
<p class="code">-1 - Current include level not opened by $ProcOpn
  %RESULT = $ProcCls
  0 - Include level closed, no more <var>$ProcOpn</var> levels left
  END REPEAT
  N - Include level close, N <var>$ProcOpn</var> levels left
</p>
</p>


==Error codes==
==Usage notes==
<p class="code">  
<ul>
-1 - Current include level not opened by $ProcOpn
<li>If <var>$ProcCls</var> is called before the current procedure has been completely processed, the current procedure is closed and the next [[$ProcGet]], [[$ProcDat]], or [[$ProcLoc]] call operates on the previous procedure, if any. <var>$ProcCls</var> will not close an input stream that was not open via [[$ProcOpn]].
  0 - Include level closed, no more <var>$ProcOpn</var> levels left
</ul>
  N - Include level close, N <var>$ProcOpn</var> levels left
 
==Example==
The following instructions close all procedure input streams opened by $ProcOpn.
<p class="code">REPEAT UNTIL %RESULT <= 0
%RESULT = $ProcCls
END REPEAT
</p>
</p>
<p class="caption">$ProcCls Result Codes
</p>
<p class="code">


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]
<li>[[Sirius Functions]]
<li>[[Fast/Unload User Language Interface]]
<li>[[Fast/Unload User Language Interface]]
<li>[[Janus Web Server]]
<li>[[Janus Web Server]]
</ul>
</ul>
</p>
<p class="caption">Products authorizing $ProcCls
</p>


[[Category:$Functions|$ProcCls]]
[[Category:$Functions|$ProcCls]]

Latest revision as of 22:42, 20 September 2018

Close procedure before reaching end

Note: Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $ProcCls function.

The $ProcCls function may be used to "close" a procedure before reaching its end.

The $ProcCls function accepts no arguments and returns a numeric result. It is a callable $function.

Syntax

%result = $ProcCls

%result is set to indicate the results of the function.

Return codes

-1 - Current include level not opened by $ProcOpn 0 - Include level closed, no more $ProcOpn levels left N - Include level close, N $ProcOpn levels left

Usage notes

  • If $ProcCls is called before the current procedure has been completely processed, the current procedure is closed and the next $ProcGet, $ProcDat, or $ProcLoc call operates on the previous procedure, if any. $ProcCls will not close an input stream that was not open via $ProcOpn.

Example

The following instructions close all procedure input streams opened by $ProcOpn.

REPEAT UNTIL %RESULT <= 0 %RESULT = $ProcCls END REPEAT

Products authorizing $ProcCls