Literals
Wworkflow system supports literals of most supported simple and composite data types.
Following is a list of the supported simple and composite data type literals:
- Boolean literal
- float literal
- integer literal
- string literal
- time literal
- array literal
Boolean literals
true
falseEnter these literals as shown above: lower case, with no surrounding quotation marks.
Float literals
[+|-]<digits>.<digits>[(E|e)[+|-]<digits>]where either
set of digits separated by the decimal point can be optional (but not both sets), and the decimal
point is optional if E or e exists. Examples of float literals
include:1.0 0.53 -1e5 3.43769e-27The maximum number of digits in a float literal is platform-dependent. If you enter a value that exceeds the limit for your server or client platform, workflow system silently truncates the value when storing it. Generally, float literals of 15 or fewer digits fall within the supported range and are not truncated.
- A binary float literal is an IEEE binary floating point value. To designate a binary float
literal, append an 'f' or 'F' to the end of the value (for example, 1f, 3.0f, -4.56F, or 6.45e17f).
A binary float value can be equal to 0, or in the following range:
- approximately 2.2250738585072014e-308≤| x|≤ approximately 1.7976931348623157e308
- A decimal float literal represents a decimal value exactly but does not conform to IEEE or any other standard. Workflow system interprets a float literal value without an appended 'f' or 'F' as a decimal float literal. A decimal float literal value can be equal to 0, or in the following range: 1e-260 ≤| x|≤ 1e252.
In mixed arithmetic of binary and decimal float values, all binary float values are converted to decimal float format for evaluation of the expression-therefore, the result of the evaluation is a decimal float value. If necessary, the result is subsequently converted back to binary float format. For example, this additional conversion is necessary if the result of the expression is to be stored in a data field, which stores only binary float values.
Integer literals
1 -25 1426987224Remember that the value must be between -2147483648 and 2147483647.
String literals
A string literal must be enclosed in either single or double quotation marks. The literal can be up to 255 characters long, including the enclosing quotation marks.
The enclosing quotation marks are not considered to be part of the string. To include single or double quotation marks in a string, you must insert two of the desired quotation marks in the appropriate position within the string. For example:
| To output this string | Input this |
|---|---|
|
|
|
|
|
|
Time literals
The time data type has no literal values.
Within an expression, a time value generally results from the systemtime() function, which returns the current time on the server where the expression is evaluated. A time value used within an expression can also result from an explicit conversion of a string literal, via the convert function or stringtotime function.
Array literals
{1.234, 4.687}