$IncStat: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(17 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Increment local system statistic</span>
<span class="pageSubtitle">Increment local system statistic</span>


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


This function allows a user to increment the current value of a local system statistic. There are 10 local system statistics that can be incremented with $IncStat. These stats can be examined via $SyStat under the names LOCAL0 through LOCAL9.  
This function allows a user to increment the current value of a local system statistic. There are ten local system statistics that can be incremented with <var>$IncStat</var>. These stats can be examined via <var>$SyStat</var> under the names <code>LOCAL0</code> through <code>LOCAL9</code>.  


The $IncStat function accepts two arguments and returns either the new value of the appropriate local statistic or a 0 if there is an error.  
The <var>$IncStat</var> function accepts two arguments and returns either the new value of the appropriate local statistic or a 0 if there is an error.  


The first argument is a number that indicates the local stat number to be incremented. This number must be 0 through 9. Otherwise, the $IncStat performs no action and returns a 0.  
==Syntax==
<p class="syntax"><span class="term">%value</span> = <span class="literal">$IncStat</span>(<span class="term">stat_num</span>, [<span class="term">value</span>])
</p>
 
<p>
<var class="term">%value</var> is set to either 0 or to the <var class="term">value</var> argument.</p>


The second argument is a number that indicates the value that will be added to the local stat. This is an optional argument and defaults to 1.
The <var class="term">stat_num</var> argument is a number that indicates the local stat number to be incremented. This number must be 0 through 9. Otherwise, the $IncStat performs no action and returns a 0.  


==Syntax==
The <var class="term">value</var> argument is a number that indicates the value that will be added to the local stat. This is an optional argument and defaults to 1.
<p class="syntax"><section begin="syntax" /> %VALUE = $IncStat(stat_num, value)
<section end="syntax" /></p>
<p class="caption">$IncStat Function
</p>
<p class="caption">%VALUE is set to either 0 or '''value'''.</p>


For example, the code fragment
==Example==
<p class="code"> %VALUE = $IncStat(2)
The following code fragment adds 1 to local stat number 2:
<p class="code">%value = $IncStat(2)
</p>
</p>


adds 1 to local stat number 2.
==Products authorizing {{PAGENAMEE}}==
 
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius Functions]]
<li>[[List of $functions|Sirius functions]]
<li>[[SirMon]]
<li>[[SirMon]]
</ul>
</ul>
<p class="caption">Products authorizing $IncStat
</p>


[[Category:$Functions|$IncStat]]
[[Category:$Functions|$IncStat]]

Latest revision as of 22:51, 20 September 2018

Increment local system statistic

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

This function allows a user to increment the current value of a local system statistic. There are ten local system statistics that can be incremented with $IncStat. These stats can be examined via $SyStat under the names LOCAL0 through LOCAL9.

The $IncStat function accepts two arguments and returns either the new value of the appropriate local statistic or a 0 if there is an error.

Syntax

%value = $IncStat(stat_num, [value])

%value is set to either 0 or to the value argument.

The stat_num argument is a number that indicates the local stat number to be incremented. This number must be 0 through 9. Otherwise, the $IncStat performs no action and returns a 0.

The value argument is a number that indicates the value that will be added to the local stat. This is an optional argument and defaults to 1.

Example

The following code fragment adds 1 to local stat number 2:

%value = $IncStat(2)

Products authorizing $IncStat