MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
max()
-
Date: Tue, 3 Sep 1996 09:09:00 PDT
-
From: Colin McCormick <colin@tripod.tripod.com>
-
Content-Type: TEXT/PLAIN; charset=US-ASCII
Is there any reason why max() takes only integer and float arguments? It
would be convenient to be able to do
;max(#56, #94)
=> #94
or even
;max("abc", "xyz")
=> "xyz"
where in this latter case the strings are compared lexicographically.
Obviously if the argument contained different types (other than just
integers and floats) max() should return an E_ARGS, but it seems reasonable
to compare object numbers with object numbers and strings with strings,
especially as the < and > operators permit this.
Colin McCormick
Tripod, Inc.
http://www.tripod.com
Home |
Subject Index |
Thread Index