Formula Example
A formula example for monthly salary is displayed below.
Header of the formula screen:
| • | Formula Code |
Name identifying formula. It must be a name that is close to or explaining the functionality of the formula. Therefore, when selecting formulas available to be added in calculation procedures, it is simpler to identify the formula purpose.
| • | Formula Desc. |
Summarized description identifying the formula functionality.
| • | Return |
Mnemonic containing the formula result. The development concept of formulas comes from the principle of what is generated, at the end of its execution, a result that can be a numeric information, character, date, logical or array. To store this result, a mnemonic result must be created with the same type of data of formula return.
To make the completion of this field easier, a query is available by pressing F3, presenting all Mnemonics.
| • | Formula Note |
A detailed description of procedures of each formula step can be informed. This helps to keep the formula steps if the procedure line are too technical and hard to interpret.
Lines of the formula screen:
| • | Seq. |
Sequence of each formula line. Default formulas are numbered from 10 to 10. The formulas defined by user have free sequences in the inclusion. However, while recording them, the routine renumbers them from 10 to 10 so if there is need to add new sequences, there is a larger period between them.
| • | Expr. |
Field to define the expression to be used in calculation. A conditional expression (.CON.) to verify or test if condition is true to start next procedure, or an expression of calculation execution (.EXE.) itself, where the procedure is executed without any verification of condition.
| • | Result |
You must inform a file field, mnemonic, role, formula or a constant. The result is completed only when it is an execution, usually finalized after a true condition. The following screen is displayed when pressing Enter in the field. Notice that field RA_SALÃRIO of SRA file, but only after the condition is satisfied.