IBM FileNet P8, Version 5.2.1            

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 literals

The only available Boolean literal values are:
true
false

Enter these literals as shown above: lower case, with no surrounding quotation marks.

Float literals

A float value takes the form
[+|-]<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-27

The 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.

Workflow system supports two float literal formats: binary and decimal.
  • 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.

Tip: Loss of precision is intrinsic to any conversion process. Many values cannot be accurately converted between decimal and binary formats (conversions from decimal to binary format are generally more problematic than conversions from binary to decimal format).

Integer literals

An integer value can have at most 10 digits and an optional + or - sign. Examples of integer literals include:
1   -25   1426987224

Remember 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:

Table 1. Table of string literal inputs and results
To output this string Input this
She said "Hello." 
 "She said ""Hello.""" 
It's OK. 
 'It''s OK.' 
"aaa" 
"""aaa""" 

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

Enclose an array literal in curly braces ({ }), separating multiple literals with commas. For example, literal values for a float array could be:
{1.234, 4.687}


Last updated: March 2016
bpfe017.htm

© Copyright IBM Corporation 2016.