ph_clearvars PowerHome formula function
Description
Clears a range of local, temp, and global system variables.
Syntax
ph_clearvars ( local, temp, global )
Argument |
Description |
local
|
Number representing the starting point of [LOCAL?] variables to be cleared. Use 0 to not clear any [LOCAL?] variables. |
temp
|
Number representing the starting point of [TEMP?] variables to be cleared. Use 0 to not clear any [TEMP?] variables. |
global
|
Number representing the starting point of [GLOBAL?] variables to be cleared. Use 0 to not clear any [GLOBAL?] variables. |
Return value
Integer. Returns a 0.
Usage
For each of the three parameters, use a positive number to clear from this variable up to the max. For example: placing a 3 in the local parameter will clear [LOCAL3] thru [LOCAL10].
Use a negative number to clear from the minimum variable to the specified number. For example: placing a - 3 in the local parameter will clear[LOCAL1] thru [LOCAL3].
The example ph_clearvars(7, - 4, 0) would clear [LOCAL7] thru [LOCAL10], clear [TEMP1] thru [TEMP4], and would not change [GLOBAL1] thru [GLOBAL20].
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_clearvars(0,3,-5)
Causes the LOCAL vars to be untouched, TEMP 3-10 to be cleared, GLOBAL 1-5 cleared
• ph_clearvars(-1, [LOCAL1],0)
Causes LOCALS to be unchanged, TEMPS cleared according to contents of LOCAL1, Globals unchanged.