$IncStat: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Increment local system statistic<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Increment local system statistic<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $IncStat function is [[to be entered]].</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>


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 10 local system statistics that can be incremented with $IncStat. These stats can be examined via $SyStat under the names LOCAL0 through LOCAL9.  
Line 11: Line 11:


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 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==
==Syntax==
<p class="syntax"><section begin="syntax" /> %VALUE = $IncStat(stat_num, value)
<p class="syntax"><section begin="syntax" /> %VALUE = $IncStat(stat_num, value)
Line 17: Line 18:
</p>
</p>
<p class="caption">%VALUE is set to either 0 or '''value'''.</p>
<p class="caption">%VALUE is set to either 0 or '''value'''.</p>


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


<ul>
<ul>
 
<li>[[Sirius Functions]]
<li>&SFUNC
<li>[[SirMon]]
 
<li>&SIRMON
 
</ul>
</ul>
   
   
</p>
<p class="caption">Products authorizing $IncStat
<p class="caption">Products authorizing $IncStat
</p>
</p>


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

Revision as of 21:16, 1 February 2011

<section begin="desc" />Increment local system statistic<section end="desc" />

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" />

$IncStat Function

%VALUE is set to either 0 or value.

For example, the code fragment

%VALUE = $IncStat(2)

adds 1 to local stat number 2.

Products authorizing $IncStat