Documentation

#ADD

ADD

Syntax: #AD varname value

This command is included for backwards compatibility. The easier way to perform addition is via the normal variable assignment:

varname = @varname + value

When using the #ADD command, do not specify the @ character at the beginning of the variable name.

The value is added to the current value of the variable varname. If value is not numeric, an error occurs. The value can also be a reference to another variable, adding its current value to the value of the listed variable. To subtract a value, use a negative value.

ADD Examples

#ADD count 1
Add one to the @count variable.
count = @count + 1
Same as the above.
#ADD count -1
Subtract one from the @count variable.
count = @count - 1
Same as the above.
#TRIGGER {(%d) packets transmitted} {#ADD ping_tally %1}
After a ping add the packets transmitted to the @ping_tally variable.

Add comment

Login or register to post comments