Is there an 'easy' way to get this cheap from integer ops
eg to check for carry on addition of two uint8s I need to do something like
(best I can think of)
I really wanted something like
var a,b uint8 = 200,100
x,error : = a+b
gives x=44, with error.carry = true and error.overflow=true .. this suggestion wouldn't fit with multiple value assignments eg a,b = a+b,a-b
my current method is very cludgy, and I doubt (?) it compiles to anything like the minimal assembler equivalent.
Thinking about a builtin math error variable (different from the Error package) - functioning as struct{overflow,carry,negative,underflow etc bool}
This isn't going to happen or be fixed soon.. Is there an easier way, in terms of both efficiency (ie what it compiles to) and appearance (ie "do what I say" quality), .. or any other thoughts ??