$IncStat: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$IncStat}} | {{DISPLAYTITLE:$IncStat}} | ||
<span class="pageSubtitle" | <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="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $IncStat function.</p> |
Revision as of 21:21, 22 November 2011
Increment local system statistic
Most Sirius $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 10 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.
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.
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.
Syntax
<section begin="syntax" /> %VALUE = $IncStat(stat_num, value) <section end="syntax" />
For example, the code fragment
%VALUE = $IncStat(2)
adds 1 to local stat number 2.