Operators

FormCalc includes a number of operators: unary, multiplicative, additive, relational, equality, logical, and the assignment operator.

Several of the FormCalc operators have an equivalent mnemonic operator keyword. These keyword operators are useful whenever FormCalc expressions are embedded in HTML and XML source text, where the symbols less than (<), greater than (>), and ampersand (&) have predefined meanings and must be escaped. The following table lists all FormCalc operators, illustrating both the symbolic and mnemonic forms where appropriate.

Operator type

Representations

Addition

+

Division

/

Equality

== eq

<> ne

Logical AND

& and

Logical OR

| or

Multiplication

*

Relational

< lt (less than)

> gt (greater than)

<= le (less than or equal to)

>= ge (greater than or equal to)

Subtraction

-

Unary

-

+

not

// Ethnio survey code removed