CX_NAMED_FORMULA
Class hierarchy
- CX_CLASS
- CX_AMOUNT
- CX_FORMULA
- CX_NAMED_FORMULA
- CX_FORMULA
- CX_AMOUNT
Description:
A CX_NAMED_FORMULA behaves like a CX_FORMULA, but with an additional data field "Name".
Code example:
// Formel erzeugen Var(formula) CreateTransObject(CX_NAMED_FORMULA) -> formula "MY_FORMULA" formula Put(name) "if (available(x)) x + 0.5cm else y - 3.3cm" formula PutData ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: [ INITIALIZE: [ "CX_NAMED_FORMULA::name" 0 COLOR LIGHTBLUE ] SetFormat [ "CX_NAMED_FORMULA::this" 100 COLOR CYAN ] SetFormat
Function | MA* | Parameters | Return | Brief description |
---|---|---|---|---|
Add | CX_AMOUNT | CX_AMOUNT | Operator + as function | |
AddAssign | CX_AMOUNT | Operator += as function | ||
Amount | OBJECT | Evaluate the formula Return the value of the result object | ||
AmountWeak | CX_AMOUNT | |||
Car format | INTEGER, INTEGER | CX_AMOUNT | Returns a formatted object according to the given number of digits before and after the decimal point (only with CX_VALUE, otherwise the object itself). | |
DivAssign | CX_AMOUNT | Operator /= as function | ||
Divide | CX_AMOUNT | CX_AMOUNT | Operator / as function | |
Evaluate | OBJECT | Evaluate the formula | ||
Evaluate1 | OBJECT | Evaluation of the formula, unbound variable leads to error | ||
Evaluate2 | OBJECT | Evaluation of the formula, for unbound variables the result is 0.0 (CX_NUMERIC) | ||
Evaluate3 | OBJECT | Evaluate the formula, unbound variables arequeried with SendMsg / Waitoninputif no InstantView® message is logged in: error . | ||
Evaluate4 | OBJECT | Evaluation of the formula, for unbound variables an object corresponding to the type with value zero is included in the calculation. | ||
EvaluateWeak | OBJECT | Evaluation of the formula condition, as with Evaluate1, errors are written to a CX_VESSEL object | ||
GetInputAccessPaths 233188 | VECTOR&lmt;STRING> | Returns all access paths of this formula | ||
GetInputVarNames | (OBJECT) | VECTOR&lmt;STRING> | returns the names of all variables required for the calculation of the formula, if a container object is specified, the corresponding dynamic data fields are created in this object | |
MulAssign | CX_AMOUNT | Operator *= as function | ||
Multiply | CX_AMOUNT | CX_AMOUNT | Operator * as function | |
RawFormula | STRING | Formula in string form | ||
SetMessage | (INTEGER) | Register InstantView® message (for Evaluate3) | ||
ShowIPN | STRING | Displaying the formula in the IP notation | ||
SubAssign | CX_AMOUNT | Operator -= as function | ||
Subtract | CX_AMOUNT | CX_AMOUNT | Operator - as a function | |
XML export | STRING | Formula in XML (local character set) form | ||
XML exportUTF8 | STRING | Formula in the XML form (UTF-8) |
* MA = Member Access Function
Special functions within a formula expression
Function | Parameters | Return | Brief description |
---|---|---|---|
available | (OBJECT) | OBJECT | tests whether the variable specified as a parameter (i.e. a dynamic data field or an access expression) is bound In contrast to has(...) the variable is loosely bound (the normal case). |
get | (OBJECT) | OBJECT | calls for the variable to be closely linked. |
has | (OBJECT) | OBJECT | tests whether the variable specified as a parameter (i.e. a dynamic data field or an access expression) is bound, whereby the variable is bound closely (see function get) |
inherited | (OBJECT, OBJECT) | OBJECT | tests whether the object designated with variable is derived from the class designated with the second parameter. The name of a class can be specified as a parameter (type constant) |
type | (OBJECT) | OBJECT | returns the type of a variable. The result can be compared with a type constant. |
var | (OBJECT) | OBJECT | returns the value of an InstantView® variable whose name must be specified as a parameter. var(...) can also be placed at the beginning of an access expression. |
Data field | Type | Reference class | I* | Brief description |
---|---|---|---|---|
uniqueID | STRING | |||
name | MULTIPLE_STRING |
* I = Indexable data field
Module | Brief description |
---|---|