[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: String to number conversions
- From: Robert Virding <rvirding@...>
- Date: Thu, 28 Nov 2019 11:22:30 +0100
Where is it possible to read exactly how and when strings are converted to numbers?in Lua 5.3. So in some case a string integer becomes a float:
> "123" + 1
while in some other cases no conversion is done:
> math.max("123", -2.3, 1)
attempt to compare string with number
[C]: in function 'math.max'
stdin:1: in main chunk
[C]: in ?
and this in the math module which sometimes does conversion?