$IncStat

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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