Difference between revisions of "Mathematical Operators"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 15: | Line 15: | ||
|%||Modulus/Remainder||3||N | |%||Modulus/Remainder||3||N | ||
|- | |- | ||
− | | | + | |+||Addition||4||N,C,D |
|- | |- | ||
|-||Subtraction||4||N,C,D | |-||Subtraction||4||N,C,D | ||
Line 27: | Line 27: | ||
!Operator||Operation | !Operator||Operation | ||
|- | |- | ||
− | | | + | |+||Concatenate the right hand string to the end of the left hand string |
|- | |- | ||
|-||Concatenate the right hand string to the end of the left hand string after trimming the left hand string of trailing spaces | |-||Concatenate the right hand string to the end of the left hand string after trimming the left hand string of trailing spaces |
Revision as of 13:19, 24 March 2009
The Recital/4GL supports the use of the following Mathematical Operators:
Operator | Operation | Precedence | Data Types |
---|---|---|---|
() | Parentheses | 1 | N,C,D |
** | Exponentiation | 2 | N |
* | Multiplication | 3 | N |
/ | Division | 3 | N |
% | Modulus/Remainder | 3 | N |
+ | Addition | 4 | N,C,D |
- | Subtraction | 4 | N,C,D |
When dealing with Character data types, the operators have the following definitions:
Operator | Operation |
---|---|
+ | Concatenate the right hand string to the end of the left hand string |
- | Concatenate the right hand string to the end of the left hand string after trimming the left hand string of trailing spaces |
Example
? 2*3^2 18 ? 2*25%7 1.00 ? [Hello ] - [ World] Hello World