REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 17-Aug-2010 Edit History  

REBOL 3 Functions: negate

negate  number

Changes the sign of a number.

Arguments:

number [number! pair! money! time! bitset!]

See also:

+   -   positive?   negative?   complement   not  

Description

Returns the negative of the value provided.

print negate 123
-123
print negate -123
123
print negate 123.45
-123.45
print negate -123.45
123.45
print negate 10:30
-10:30
print negate 100x20
-100x-20
print negate 100x-20
-100x20


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin