
On Wed, Jun 4, 2014 at 9:31 PM, Philipp Janda <siffiejoe@gmx.net> wrote:
Am 04.06.2014 18:48 schröbte Andrew Starks:It's the same with strings:
print(math.min(1,2), math.max(1,2))
1.0, 2.0
I would have expected integers.
print(type(math.max("1", "2")))
Andrew
Philipp
I'd be very surprised if math.max(a, b) behaved any differently from:function max(a, b)if a > b then return aelse return bend
endi.e. no changing of types involved (and for that matter, not caring at all about types, as long as the operands have > defined).
(Of course it's slightly trickier since math.max() accepts any number of values except zero, but the principle is the same.)

Sent from my Game Boy.