$ErrSet: Difference between revisions
(Automatically generated page update) |
m (minor cleanup) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$ErrSet}} | {{DISPLAYTITLE:$ErrSet}} | ||
<span class="pageSubtitle">Increment or clear number of counting errors, set $ | <span class="pageSubtitle">Increment or clear number of counting errors, set $Errmsg</span> | ||
<p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.</p> | <p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.</p> | ||
This function allows you to set or clear the current error message (which is returned by $ | This function allows you to set or clear the current error message (which is returned by <var>[[$Errmsg]]</var>) and to increment or clear the number of "counting" errors. | ||
The <var>$ErrSet</var> function accepts one argument and returns a number indicating the current number of counting errors. | The <var>$ErrSet</var> function accepts one argument and returns a number indicating the current number of counting errors. It is a [[Calling Sirius Mods $functions|callable]] $function. | ||
The first argument is a string indicating the message to be returned by the next <var>$Errmsg</var> call. If this argument is omitted or null, the current error message is cleared and the number of counting errors is set to 0; otherwise the number of counting errors is incremented. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax">[% | <p class="syntax">[<span class="term">%count</span> =] $ErrSet(<span class="term"string</span>) | ||
</p> | </p> | ||
<p> | <p> | ||
%COUNT is the number of "counting" errors.</p> | |||
For example | For example | ||
<p class="code"> % | <p class="code">%count = $ErrSet('NASTY ERROR') | ||
%junk = $Errmsg | |||
</p> | </p> | ||
would set % | would set <code>%junk</code> to <code>NASTY ERROR</code> and would increment the number of counting errors. | ||
You can also change the number of counting errors (the Sirius ERCNT parameter) with [[$Resetn]]. | |||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== | ||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
Line 32: | Line 33: | ||
<li>Japanese functions</li> | <li>Japanese functions</li> | ||
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$ErrSet]] | [[Category:$Functions|$ErrSet]] |
Revision as of 16:01, 12 June 2015
Increment or clear number of counting errors, set $Errmsg
Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.
This function allows you to set or clear the current error message (which is returned by $Errmsg) and to increment or clear the number of "counting" errors.
The $ErrSet function accepts one argument and returns a number indicating the current number of counting errors. It is a callable $function.
The first argument is a string indicating the message to be returned by the next $Errmsg call. If this argument is omitted or null, the current error message is cleared and the number of counting errors is set to 0; otherwise the number of counting errors is incremented.
Syntax
[%count =] $ErrSet(<span class="term"string)
%COUNT is the number of "counting" errors.
For example
%count = $ErrSet('NASTY ERROR') %junk = $Errmsg
would set %junk
to NASTY ERROR
and would increment the number of counting errors.
You can also change the number of counting errors (the Sirius ERCNT parameter) with $Resetn.