The + and - arithmetic operators can be used on numeric format strings as well as date and character format strings. The data format is shown in Table 4.5.
Operator |
Format |
Description |
Example |
Addition(+) |
|
Addition of numeric values |
1.5+2.3 (3.8) |
|
Join character strings |
"150"+"円" ("150円") |
|
|
|
0d20121130+2 (0d20121202) |
|
|
|
0t095959+2 (0t100001) |
|
Substraction(-) |
|
Subtraction of numeric values |
1.5-2.3 (-1.8) |
|
Remove substring |
"aababa"-"a" ("bb") |
|
(by greedy match algorithm) |
"aababa"-"aba" ("aba") |
||
|
|
0d20121202-2 (0d20121130) |
|
|
|
0t100001-2 (0t095959) |
|
|
Date difference |
0d20121202-0d20121130 (2) |
|
|
Time difference |
0t095959-0t100001 (-2) |
|
Multiplication (*) |
|
multiply |
10*2 (20) |
Division (/) |
|
divide |
10/2 (5) |
Remainder (%) |
|
remainder |
10%3 (1) |
Power ( |
|
power |
10^3 (1000) |