Parameter | Reference | Type | Length | Default | Optional | Text |
---|---|---|---|---|---|---|
DEGREES | 0 | SPACE | X | Operators for angle function specified in GRAD | ||
FORMULA | 0 | Formula to be calculated | ||||
NO_EXISTENCE_CHECK | 0 | SPACE | X | 'X' if existence of program/routine is not to be checked | ||
PROGRAM | 0 | SPACE | X | Program for value assignment to a variable | ||
ROUTINE | 0 | SPACE | X | Routine for value assignment to a variable | ||
UNIT_OF_MEASURE | 0 | SPACE | X | Unit of measurement for calculated value |
Parameter | Reference | Type | Length | Text |
---|---|---|---|---|
VALUE | 0 | calculated value of the formula |
Exception | Text |
---|---|
DIVISION_BY_ZERO | Division by zero |
EXP_ERROR | Invalid argument for exponential function |
FORMULA_TABLE_NOT_VALID | Invalid formula set |
INVALID_EXPRESSION | Syntax errors |
INVALID_VALUE | Invalid Value |
LOG_ERROR | Invalid argument for logarithmic function |
MISSING_PARAMETER | Program or Routines Missing for Variables |
PARAMETER_ERROR | Invalid parameter |
SQRT_ERROR | Invalid argument for root function |
UNITS_NOT_VALID | Invalid unit of measure |
Functionality
,,ELSE Example: FORMEL = COS(A**2+B**2) FORMEL = IF X>0 THEN SIN(X) ELSE SIN(-X) FORMEL = SY-TZONE / 2.324 The FM supports the following functions: ABS,,absolute value NOT,,negation SIN,,sine function COS,,cosine function TAN,,tangent function LOG,,logarithm to base e (natural logarithm) EXP,,exponential function to base e SQRT,,square root function ROUND,,round to a whole number TRUNC,,truncate, the whole number part of a real number MOD,,modulus function DIV,,whole number part of a division The operators are classified into 6 priority groups. Group 0 has thelowest priority, group 6 the highest. The operators are: AND,,logical AND OR,,logical OR =,,equals <>, ><,,not equal to <,,less than >,,greater than <=, =<,,less than or equal to >,,greater than =>, >=,,greater than or equal to +,,positive value (of an expression) -,,negative value (of an expression) +,,addition -,,subtraction *,,multiplication /,,division **,,exponential ABS,,absolute value NOT,,negation (of a logical expression) all other functions. The FM also evaluates user-defined functions, which are defined in atable. Description Description Description Description Description Description |