Navigation
Synopsis Addition on numeric values.
Syntax Exp1 + Exp2
Types
Exp1 Exp2 Exp1 + Exp2
int int int
int real real
real real real
Description Yields the numerical sum of the values of Exp1 and Exp2.
Examples
rascal>12 + 13
int: 25
rascal>12 + 13.5
real: 25.5

Questions
Question [1]. Adding integers.
The type of 8 + 1 is

Question [2]. Adding integers.
1 + 0  == 

Question [3]. Adding integers and reals.
The type of 6 + 18.8948051989817960 is

Question [4].
2 + 7.05199656183175260  == 

Question [5]. Use parentheses when addition and negative numbers interact.
-13 + (-16) == 

Question [6]. Use parentheses when addition and negative numbers interact.
-6 +  == -15



Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.