$SetStat: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Set local system statistic<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Set local system statistic<section end="desc" /></span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $SetStat function.</p> | ||
This function allows a user to set the current value of a local system statistic. There are 10 local system statistics that can be set via $SetStat. These stats can be examined via $SyStat under the names LOCAL0 through LOCAL9. | This function allows a user to set the current value of a local system statistic. There are 10 local system statistics that can be set via $SetStat. These stats can be examined via $SyStat under the names LOCAL0 through LOCAL9. | ||
Line 22: | Line 22: | ||
<p class="code"> %VALUE = $SetStat(1) | <p class="code"> %VALUE = $SetStat(1) | ||
</p> | </p> | ||
initializes local stat number 1 to 0. | initializes local stat number 1 to 0. | ||
<ul> | <ul> | ||
<li>[[Sirius $Functions]] | |||
<li> | <li>[[SirMon]] | ||
<li> | |||
</ul> | </ul> | ||
<p class="caption">Products authorizing $SetStat | <p class="caption">Products authorizing $SetStat | ||
</p> | </p> | ||
[[Category:$Functions|$SetStat]] | [[Category:$Functions|$SetStat]] |
Revision as of 18:08, 8 February 2011
<section begin="desc" />Set local system statistic<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $SetStat function.
This function allows a user to set the current value of a local system statistic. There are 10 local system statistics that can be set via $SetStat. These stats can be examined via $SyStat under the names LOCAL0 through LOCAL9.
The $SetStat 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 the local stat number to be set. This number must be 0 through 9 or the $SetStat performs no action and returns a 0.
The second argument is a number that indicates the value to which the local stat is to be set. This is an optional argument and defaults to 0.
Syntax
<section begin="syntax" /> %VALUE = $SetStat(stat_num, value) <section end="syntax" />
This function can be used to initialize a local statistic. For example, the code fragment
%VALUE = $SetStat(1)
initializes local stat number 1 to 0.