adds
fn
int adds()(int x, int y, ref bool overflow)Add two signed integers, checking for overflow.
The overflow is sticky, meaning a sequence of operations can be done and overflow need only be checked at the end.
Parameters
x | left operand |
y | right operand |
overflow | set if an overflow occurs, is not affected otherwise |
Returns
the sum
fn
long adds()(long x, long y, ref bool overflow)ditto