XFA Specification
Chapter 23, FormCalc Specification
Grammar and Syntax
819
function will generate an error exception. This rule applies to all binary and unary operands involving
accessors that use the [*]-style of referral.
Expression
Abs(Quantity[*])
Quantity[*] + 10
Result
Generates an error exception, irrespective of the
number of occurrences of object
Quantity
Generates an error exception, respectively of the
number of occurrences of object
Quantity
As noted earlier, the dollar sign ($) character is a valid character in Identifier names (“Identifiers”). However,
this specification recommends that processing applications forbid including the dollar sign ($) character in
the names of objects and properties — object names and properties containing this character can thus be
reserved for special application-defined tasks.
References
In the processing application's model hierarchy, not all objects simply have values. Many only contain
sub-objects. It is often useful to manipulate objects indirectly, rather than through explicitly named
accessors, particularly if such objects are difficult and/or expensive to locate. The mechanism for indirectly
manipulating an object in
FormCalc
is called a reference.
Simply stated, references are handles to existing model objects.
When a reference is:
assigned to variable,
passed as an argument to a method or function,
returned from a method or function,
compared for equality and inequality, or
further qualified by an accessor or method,
some special rules apply. In all other contexts where a reference is used, it simply refers to the value of the
object it's handling at the time.
Assignment of References
For variable
V
, expression
e
and object
O
, the assignment
var V = e
is evaluated as follows:
If expression
e
is a reference, variable
V
becomes a reference to the same object referred to by
e
;
otherwise, if
e
is a null reference,
V
becomes a variable with the value null;
If expression
e
is not a reference, and variable
V
is a reference, then the value of the object referred to
by variable
V
becomes the value
e
;
Otherwise, variable
V
becomes the value
e
.
The following table illustrates the evaluation of
var V = e
, given different combinations of referencing.
The symbol
&
designates a reference to an object, and
designates the de-referencing of an object then
we have the following table:
Home Index Bookmark Pages
Pages: Home Index All Pages