XFA Specification
Chapter 23, FormCalc Specification
Grammar and Syntax
813
always the empty string. For example, the following expression evaluates to
"The total is 2
dollars and 57 cents."
concat("The total is ", 2, " dollars and ", 57, " cents.")
All the intermediate results of numeric expressions are evaluated as double precision IEEE 754 64 bit
values. The final result is displayed with up to 11 fractional digits of precision. Should an intermediate
expression yield an NaN, +Inf or -Inf,FormCalc will currently generate an error exception and propagate
that error for the remainder of that expression, and the expression's value will always be zero. For example:
3 / 0 + 1
FormCalc terminates when an exception is raised.
Logical Or Expressions
68 LogicalOrExpression ::= LogicalAndExpression |
LogicalOrExpression LogicalOrOperator LogicalAndExpression
69 LogicalOrOperator ::= '|' | 'or'
A LogicalOrExpression
68
returns the result of a logical disjunction of its operands, or null if both operands
are null. If not both null, the operands are promoted to numeric values, and a numeric operation is
performed.
The LogicalOrOperators '|' and 'or', represent the same logical-or operator. The logical-or operator returns
the boolean result true, represented by the numeric value 1, whenever either operand is not 0 and returns
the boolean result false, represented by the numeric value 0, otherwise.
Logical And Expressions
70 LogicalAndExpression ::= EqualityExpression |
LogicalAndExpression LogicalAndOperator EqualityExpression
71 LogicalAndOperator ::= '&' | 'and'
A LogicalAndExpression
70
returns the result of a logical conjunction of its operands, or null if both
operands are null. If not both null, the operands are promoted to numeric values, and a numeric operation
is performed.
The LogicalAndOperators '&' and 'and', both represent the same logical-and operator. The logical-and
operator returns the boolean result true, represented by the numeric value 1, whenever both operands are
not 0 and returns the boolean result false, represented by the numeric value 0, otherwise.
Equality Expressions
72 EqualityExpression ::= RelationalExpression |
EqualityExpression EqualityOperator RelationalExpression
73 EqualityOperator ::= '==' | '<>' | 'eq' | 'ne'
An EqualityExpression
72
returns the result of an equality comparison of its operands.
If either operand is null, then a null comparison is performed. Null valued operands compare identically
whenever both operands are null, and compare differently whenever one operand is not null.
If both operands are references (“References”
on page 819),
then both operands compare identically when
they both refer to the same object, and compare differently when they don't refer to the same object.
Home Index Bookmark Pages
Pages: Home Index All Pages