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

REBOL 3 Functions: -

-  value1  value2

Returns the second value subtracted from the first.

Arguments:

value1 [scalar! date!]

value2 [scalar! date!]

See also:

+   add   subtract   negate   absolute  

Description

If used with only a single value, it negates the value (unary minus). When subtracting values of different datatypes, the values must be compatible.

print 123 - 1
122
print -123  ; a negative number
-123
print - 123  ; negating a positive number (unary)

print 12:00 - 11:00
1:00
print 1-Jan-2000 - 1
31-Dec-1999
print 1.2.3.4 - 1.0.3.0
0.2.0.4


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