|
ASSIGNMENT OPERATORS Assignment operators are domain-specific, such that the operator indicates the domain to be assigned into. Secondly, Pro/3 uses both deterministic and non-deterministic assignments. The assignment operator formats are:
RESULT-DOMAIN IN ASSIGNMENTS Value assignments are based on an explicit or implicit result domain. The result domain is determined by the assignment operator i.e. the operator is domain-qualified. This is implemented both in NL-format and internal format as a two- or three letter suffix to the operator (corresponding to the domain short format). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The domain-qualifier is optional, and if absent, Pro/3 determines the result
domain from the context. This can give un-intended results in some case, e.g. an
expected integer-value becomes a number-value or vice versa. It is therefore
highly recommended to use domain-qualified assignments, i.e. in function
statements and in sentence rules (in variable condition-elements -
assignments to data elements in the conclusion are automatically
domain-qualified by the rule editor on the basis of the data element's domain). The different domains fall into four groups, integer, number, string, identifier, and the inference engine has four corresponding evaluation procedures. Note the following evaluation rules:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARITHMETICAL OPERATORS Arithmetical operators are used to form arithmetical expressions.
Comparison operators are not domain-qualified (with the exception of equality comparison, which generally are qualified i.e. there is no distinction between the assignment operator and the equality comparison operator). Pro/3 will thus decide on the result domain (integer, number, string or identifier) according to the actual operands and the rules 1-7 over.
Wild-card characters in
like/unlike-expressions are limited to:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Values and expressions occur on the right side of an assignment or comparison operator (or assumed assignment operator). Values include:
Function calls
Compound values, i.e. combinations of simple values, operators and parenthesizes, are referred to as expressions. Expression operators include the arithmetical operators and the string operators. There are no limits with respect to the nesting of expressions and sub-expressions. However, expressions must be fully parenthesized (there is no operator hierarchy). Expressions can include all value types including data element references, solution set size references, functions calls and inexact rule calls. However, data element references and solution set references can not contain variables when used in expressions. (The first data element reference above is allowed in expressions, while the second is not). Note in this regard that simple values are regarded as expressions when they occur in the conclusion part of rules.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||