The addition operator adds two values or concatenates two strings, i.e. a + b.
Syntax
a + b
Input
When used on values:
a | is a value |
Domain type: | any Value domain |
b | is a value |
Domain type: | any Value domain |
When used on strings:
a | is an item of a class or ID domain or a string |
Domain type: | any Class, ID or String domain |
b | is an item of a class or ID domain or a string |
Domain type: | any Class, ID or String domain |
Output
When used on values:
+ returns: | a real value |
Domain: | system domain Value |
When used on strings:
+ returns: | a string |
Domain: | system domain String |
Notes:
Tip:
When the definition symbol = is used, a dependent output map or dependent output column is created; when the assignment symbol := is used, the dependency link is immediately broken after the output map/column has been calculated.
Usable in
MapCalc, TabCalc, Simple calculators
Examples
Pocket line calculator examples:
? 10+2 |
returns 12 |
? 2^3+4 |
returns 12.000 |
? "My"+"String" |
returns MyString |
MapCalc example:
OutMap = InMapA + InMapB
InMapA |
InMapB |
OutMap |
|||||||||||||||||||||||||||
|
|
|
TabCalc example:
OutCol = InColA + InColB
InColA |
InColB |
OutCol |
10 |
1 |
11 |
20 |
2 |
22 |
30 |
3 |
33 |
-40 |
4 |
-36 |
50 |
0 |
50 |
60 |
-1 |
59 |
70 |
? |
? |
? |
-2 |
? |
90 |
-3 |
87 |
Applied example: concatenation operator
Combined = Terrain + LandUse
Terrain |
DescrTerrain |
Landuse |
DescrLanduse |
Combined |
C2 |
LagoonPlain |
Pr |
PaddyRiceRain |
C2Pr |
F |
CollFootslope |
H |
HomesteadGarden |
FH |
H1 |
VolcHillsMod |
Fb |
SecForest |
H1Fb |
H1 |
VolcHillsMod |
G |
Grazing |
H1G |
H1 |
VolcHillsMod |
Ut |
UplandCropsTrees |
H1Ut |
H2 |
VolcHillsSteep |
Fp |
PrimForest |
H2Fp |
H2 |
VolcHillsSteep |
Ut |
UplandCropsTrees |
H2Ut |
U1 |
CoastUplandFlat |
G |
Grazing |
U1G |
U1 |
CoastUplandFlat |
H |
HomesteadGarden |
U1H |
U2 |
CoastUplandMod |
G |
Grazing |
U2G |
U2 |
CoastUplandMod |
Tu |
TreeCrops |
U2Tu |
U4 |
CoastUplandSteep |
Tu |
TreeCrops |
U4Tu |
V1 |
InfilledValleys |
H |
HomesteadGarden |
V1H |
V1 |
InfilledValleys |
Pi |
PaddyRiceIrr |
V1Pi |
V2 |
InfilledLevees |
H |
HomesteadGarden |
V2H |
The expression results in a column Combined which contains a combination of the class names in columns Terrain and LandUse.
See also:
- | ^ |
* | MOD |