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

REBOL 3 Functions: subtract

subtract  value1  value2

Returns the second value subtracted from the first.


value1 [scalar! date!]

value2 [scalar! date!]

See also:

-   +   add   absolute  


Note: The + operator is a special infix form for this function.

Many different datatypes support subtraction. Here are just a few:

print subtract 123 1
print subtract
print subtract 12:00 11:00
print subtract 1-Jan-2000 1

When subtracting values of different datatypes, the values must be compatible. Auto conversion of the values will occur into the datatype that has the most expansive representation. For example an integer subtracted from a decimal will produce a decimal.

  TOC < Back Next > - WIP Wiki Feedback Admin