Unary Minus ( -X )
Syntax: - EXP
The unary minus operator simply changes the sign of the expression,
variable or constant that follows. In the given example, 2*2 will produce
4. The unary minus changes the sign from positive to negative resulting
in "-4" being printed. Similarly, if the unary minus operator was applied
to a negative value then the result would be a positive value.
Example
PRINT – ( 2 * 2 )
|