A reference to any user-defined function or Toolbox function that returns a numeric value.Examples:

FN theSum# FN GETCATINFO(@pb)

A value returned by any built-in FB function whose name does not end with "$". (Note: the two exceptions to this are the USING function and the STR# function, both of which return a string value.)Examples:

Data comparison expressions always return the value -1 or 0. In many contexts, these values are interpreted as meaning "true" or "false," respectively. Data comparison expressions have the following forms:

An equality comparison consists of two expressions of "compatible types" separated by the "=" operator or the "<>" operator (you can also use "==" as a synonym for "=", and "!=" as a synonym for "<>"). The two operands must fall into one of the following categories:

An equality comparison using "=" (or "==") is evaluated as -1 if the two operands have equal values; otherwise it's evaluated as 0. An equality comparison using "<>" (or "!=") is evaluated as -1 if the two operands are not equal; otherwise it's evaluated as 0.Examples:

An order comparison can test the relative "order" of two numeric operands, or of two string operands; that is, it tests whether one operand is greater than or less than the other. In the case of strings, string1$ is considered "less than" string2$ if it precedes string2$ alphabetically. More accurately, string comparison depends on the ASCII values of the characters in the strings. An order comparison takes the form expr1 operator expr2, where expr1 and expr2 are both numeric expressions or both string expressions, and operator is one of the operators in this table:

A unary operator is an operator that takes only one operand. FB has three unary operators: "+"; "-"; "NOT". The unary operator always appears on the left side of the operand; the operand can be any numeric expression.

A compound numeric expression is any list of numeric expressions separated by one or more of the operators in the table below. A compound expression has this form:

expr1 operator expr2 [operator expr3 ...]

Additionally, any expression which is surrounded by a pair of parentheses is also an expression. When you surround an expression with parentheses, the entire expression within parentheses is evaluated before any operator to the left or right of the parenthetical expression is applied. This is useful when you want to change the default order in which the operators are applied. For example:

3 * (7 + 1)

In the above expression, the "+" operator is applied before the "*" operator. 3 is multiplied by the sum of 7 and 1, giving a result of 24. But if the expression had been written like this:

3 * 7 + 1

then the "*" operator would have been applied first. In this case, 1 is added to the product of 3 and 7, giving a result of 22.

When an expression includes more than one operator, the order in which the operations are performed can affect the result. When an operator appears to the left or right of a parenthetical expression, all of the operations within the parentheses are performed first. When several operators all appear within the same matching pair of parentheses (or outside of all parentheses), the order in which their operations are performed is determined by their order of precedence, with "higher precedence" operations being performed before "lower precedence" ones. For example, consider this expression:

4 + 7 * 5

The "*" operator has a higher precedence than the "+" operator (see the table below). So, when this expression is evaluated, first 7 is multiplied by 5 to get 35; then that result is added to 4 to get the final answer of 39.

The following table lists the operators in order of their precedence, from highest to lowest. When an expression contains several operators at the same level of precedence (and within the same depth of parentheses), their operations are always performed from left to right.

Many FB statements require quantities that are expressed as static integer expressions. A static integer expression may be a simple or complex expression, but its operands are limited to the following: