The unary - operator works exactly as one would expect, it changes the postive/negative aspect of a number without changing its magnitude. For zero, which has neither a positive aspect nor a negative aspect, unary - yields zero. So, for any number apart from 0, unary - gives a result which is different from the operand.

Except for the bug, -0. The expression -&H80000==&H80000 evaluates to TRUE.

This operator is in the unary precedence group, which is the highest. This means all unary operators are evaluated before any others, e.g. addition, so -7+2 is evaluated as (-7)+2. Since all unary operators are prefixes to their operands, they are right-associative, i.e. the rightmost ones are evaluated first.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.