Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: script error...

From: hallvard:ystad:helpinhand at: 2-Oct-2001 18:45

>> value1: 1
== 1
>> value2: 2
== 2
>> value3: 3
== 3
>> print maximum (maximum value1 value2) value3
3 (Which means I'm not able to reproduce your error). I think you should stick to the other proposed solution:
>> maximum-of reduce [value1 value2 value3]
== [3] the maximum-of function takes a block and returns it from the point where it finds the first occurence of the highest value:
>> maximum-of reduce [value1 value2 value3 value2 value3 value1]
== [3 2 3 1] So to retrieve only the value you need, use 'first:
>> first maximum-of reduce [value1 value2 value3 value2 value3 value1]
== 3 ~H mgkiourt skrev (18.02 02.10.2001):