[NO REPLY] Operators (rev #2, 2018-1-15)
Posted: Sun Dec 10, 2017 6:32 pm
The overflow operator
Simply put, something ho handle arithmetic overflows or underflows without having to extend the integer size, example:
Giovanni
Simply put, something ho handle arithmetic overflows or underflows without having to extend the integer size, example:
Code: Select all
if (ovf d = a + b - c) {
error();
}
- Lowest priority.
- Operates on integer types.
- Only perform checks on + - *
- Basically it is a carry flag check after each operation.
- It is an unary operator, the check is done on all compatible elementary operations on the right side expression
Giovanni