Lerameur,
Multiplications with negative numbers works but if you need division you need to do a little "manual" work:
/Henrik Olsson.Code:Sign VAR Word 'This will hold the sign of our value. Left VAR Word Right VAR Word Temp VAR Word Left = 100 Right = 200 Temp = Left - Right 'Temp is now -100 (or 65436) If Temp.15 = 1 then 'Highest bit set means value is negative Sign = -1 Else Sign = 1 Endif 'We cant divide a negative number so we have to use the ABS operator. Temp = ABS(Temp) / 2 'Temp is now 50 (positve) Temp = Temp * Sign 'Re-apply sign, Temp is now -50 (or 65486)




Bookmarks