Appendix 4: Formula Errors: Compile time
Here are the descriptions of the various formula errors during the compile time:
Formula Error | Description |
---|---|
Syntax Error | The formula text violates the grammatical rules for the formula
language. Example: Using IF1 instead of IF for an IF statement. |
Incorrect Statement Order | ALIAS, DEFAULT, or INPUT statements appear after other statements. |
Misuse of ASSIGNMENT Statement | An ASSIGNMENT assigns a value to a database item. A context is assigned a value externally to a CHANGE-CONTEXTS statement. A non-context variable is assigned a value within a CHANGE-CONTEXTS statement. |
Misuse of ALIAS Statement | An ALIAS statement may only be used for a database item. |
Missing DEFAULT Statement | A database item with defaulting specified must have a DEFAULT statement. |
Misuse of DEFAULT Statement | A DEFAULT statement is specified for a variable other than an input or database item. |
Uninitialized Variable | The compiler detects that a variable is uninitialized when used. The
compiler cannot do in all cases. This error often occurs when the intention is to use a database item, but the database item is not available to the formula (it does not exist, or partitioning restrictions mean it’s not available to the formula). |
Missing Function Call | A function call is not recognised. The combination of return type, function name, and parameter types does not match any available function. |
Incorrect Operator Usage | An instance of formula operator use does not match the permitted uses
of that operator. Example: The + operator has two permitted uses. The operands are both of data type NUMBER, or both of data type TEXT. |
Inconsistent Data Type Usage | A formula variable is being used as if it is of more than one data
type. Example: Variable A is assigned a NUMBER value at the start of the formula, but a TEXT value later in the formula. A database item or context is being used with the wrong data type. |
EXIT Statement Not Within WHILE Loop | |
Mixed Use of Context | A variable is later used as a context or vice versa. Example: AREA1 is assigned a value so it’s used as an ordinary variable, but later AREA1 is used as a context in a GET_CONTEXT call. |