2, 2.1828, 3.5cm, "string", T(zwei, two, deux)
| Stack | Position | Description |
|---|---|---|
| Stack(In) | top | - |
| Stack(Out) | top | constant value |
InstantView® knows the following constants:
| Typ | Example | Stack value |
|---|---|---|
| Integer | 3 | integer |
| Numeric | 3.14 | transient object CX_NUMERIC |
| Value | 3.14 m | transient object CX_VALUE |
| String | "abc\ndef" | string |
| Path(Klasse::zugriffsAusdruck) | class + Access Path as string | |
| multiple String | T("d r e i", three, trois) | Multilingual String |
| Flag | NF_SET_PRECISION | flag |
| INVALID | INVALID | value of a not-initialized Variable |
| ACCESS_DENIED | ACCESS_DENIED | result for read access, if there are no Access Authorizations for the data |
Negative numeric constants - Integer, Numeric, Value - have to be inside parenthesis (to make the difference clear between minus character and the operator -). The minus character can be in front of the number or behind it. There are Predefined Identifiers for some integer constants.
A dimensioned constant (a CX_VALUE object) is an integer or a real number followed by an (English) unit. When using the variable name (such as m for meter) also as a variable or statement name, this has priority! (see Example).
Special characters within a string are expressed just like in C/C++:
| hexadecimal | Meaning | |
|---|---|---|
| \n | 0x0d | CR |
| \r | 0x0a | LF |
| \f | 0x0c | FF |
| \t | 0x09 | Tab |
| \b | 0x08 | BS |
| \\ | 0x5c | character \ |
| \" | 0x22 | character " |
| \nnn | code of any character as octal number |
If the string with form "class::accessPath" is required as parameters (see statement SetFormat), the string constant can be written in the form Path(class::accesspath). Unlike the string syntax "class::accesspath" - only syntactical constructions are possible. This syntax is necessary, whenever strings appear as function parameters in the Access Path, which are sub-strings in \"....\" (see Example).
Information: The number of decimal places for a numerical constant is defined by the CX_NUMERIC object precision.
more Examples...