We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
The + operator is used for adding two numeric types.
+
1 + 2
The + operator can be defined for non-numeric types or type combinations with the following:
func __add__(a $A, b $B) $C
where $A, $B and $C are any valid types
$A
$B
$C
See __add__ for more information.
__add__
A common usage of the + operator (for non-numeric types) is concatenating String values:
String
"Welcome " + "Isaac"
Allowed by these definitions:
func __add__(lhs String, rhs String) String func __add__(lhs String, rhs ubyte) String func __add__(lhs POD String, rhs $T~__primitive__) String
Table of Contents