Visual Basic - additive inverse: -

operator negative sign is used to change the sign of expressions. it works as a negation: if the expression value is positive then the result will be negative, and if the expression is negative then the result will be positive.



- expression
Used keywords: -




Visual Basic .NET

additive inverse the possible of use:
xmin = -32768
 ymax = 32767
Dim x As short= -1234        ' x = -1234
Dim y As short= -(1500 mod 60)' y = -25
y = CShort((x * y))    ' z = 30850

Visual Basic .NET

Other pieces of example codes:
Dim x As integer= -12345
Dim x As sbyte= -5
Dim x As long= -82345

you can find it in the following collections: arithmetic operators
Languages: en hu cz sk