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

REBOL 3 Functions: min

min  value1  value2

Returns the lesser of the two values.

Arguments:

value1 [scalar! date! series!]

value2 [scalar! date! series!]

See also:

max   <   >   minimum-of   maximum-of  

Description

Returns the minimum of two values.

print min 0 100
0
print min 0 -100
-100
print min 4.56 4.2
4.2

The minimum value is computed by comparison, so MIN can also be used for non-numeric datatypes as well.

print min 1.2.3 1.2.8
1.2.3
print min "abc" "abd"
abc
print min 12:00 11:00
11:00
print min 1-Jan-1920 20-Feb-1952
1-Jan-1920

Using min on xy pairs will return the minimum of each X and Y coordinate separately.

print min 100x10 200x20
100x10


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