formulacalc
RESULT
,
FORMULA

The formulacalc statement allows you to evaluate a formula that you were not able to code into the procedure when it was being written.


Parameters

This statement has two parameters:

result – must be the name of a field or a variable where you wish the result of the formula to be placed. The formula’s resulting value must match the type and format (if any) of result or an error alert dialog will be displayed. If a field is specified it must be in the current database.

formula – is the formula to be calculated. Unlike an assignment statement, the formula itself is calculated by another formula, allowing you to change the formula on the fly. If the formula doesn’t need to be changed you must enclose it in quotes, but you can also store the formula in a variable or even calculate the formula with another formula.


Description

This statement calculates the result of a formula. This statement allows you to change the formula on the fly.

This simple example allows the user to enter a calculation to be performed.

local myFormula,myResult
gettext "Enter Formula:",myFormula
formulacalc myResult,myFormula
message myResult

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.