MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

max()




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