ph_addtovar PowerHome formula function
Description
Adds a value to a system variable
Syntax
ph_addtovar ( type, id, value )
Argument |
Description |
type |
Integer. The type of the system variable. 1 denotes a local variable, 2 denotes a temp variable, and 3 denotes a system global variable. |
id |
Integer. The number of the system variable. 1 thru 10 is valid for local and temp variables. 1 thru 100 is valid for system global variables. |
value |
Long. A positive or negative double value that you want the system variable adjusted by. |
Return value
Double. Returns the value of the system variable after it has been adjusted by value.
NOTE: This function should ONLY be used when it is known that the system variable contains numeric data.
Examples
The following examples demonstrate typical syntax/usage for this function.
• To Add "15" to LOCAL3 >>> ph_addtovar(1,3,15)
• To Add "65" to TEMP5 >>> ph_addtovar(2,5,65)
• To Add "210" to GLOBAL2 >>> ph_addtovar(3,2,210)