ZERO Function
The ZERO function returns a value of zero if the template user leaves the number variable you specify unanswered. This function allows you to use the provided Number variable in scripts without worrying about it halting your script if the variable has not been answered.
Function name |
ZERO |
Usage model | ZERO ( n:NUM ) |
Parameters | This function requires you to replace only one parameter: |
n: NUM |
The function evaluates the assigned to an unanswered zero or Number variable. |
Result | A number value. |
Example
Consider a script that calculates a total price that may or may not include a shipping cost. If there is a shipping cost, the amount is stored in the Number variable "Shipping Cost NU".
TotalPriceNU = PriceNU + ZERO( ShippingCostNU )
The above script would correctly calculate your total price whether or not ShippingCostNU has been answered.