Compatibility of Operators with Types
Rule language grammar defines operators compatibility with types.
Compatibility is described as follows:
Right Side of Operator | |||||||||
---|---|---|---|---|---|---|---|---|---|
str | int | lon | dou | boo | ent | obj | dat | ||
Left Side of Operator |
str |
=, +, eq, cmp, inst | + | + | + | + | + | =, +, eq, cmp, inst | + |
int |
+ | =, math, eq, cmp | =, math, eq, cmp | =, math, eq, cmp | =, math, eq, cmp | ||||
lon |
+ | =, math, eq, cmp | =, math, eq, cmp | =, math, eq, cmp | =, math, eq, cmp | ||||
dou |
+ | =, math, eq, cmp | =, math, eq, cmp | =, math, eq, cmp | =, math, eq, cmp | ||||
boo |
+ | =, eq | =, eq | ||||||
ent |
+ | =, eq, inst | =, eq, inst | ||||||
obj |
=, +, eq, cmp, inst | =, math, eq, cmp | =, math, eq, cmp | =, math, eq, cmp | =, eq | =, eq, inst | =, eq, inst | =, eq, inst | |
dat |
+, | =, eq, inst | =, eq, cmp, inst |
Abbreviation | Meaning and Notes |
---|---|
boo |
Boolean. |
cmp |
Comparison operators: <, >, <=, >= |
dat |
Date/Time |
dou |
Double |
ent |
Entity. Type includes Concept, Event and Scorecard. Both operands must either be of the same type or have a subtype-supertype relationship |
eq |
Equality operators: ==, != |
inst |
instanceof |
int |
Integer |
lon |
Long |
math |
Numerical operators: unary +, unary -, =, - , *, /, % |
obj |
Object |
str |
String |
Copyright © Cloud Software Group, Inc. All rights reserved.