|
(1) '5' + 5 gives you an 10.0 in the interactive console. Isn't this a weakly typed language behavior?(2) '5' + 5 > 10.0, string plus integer equals float. If an error was throw here, it would be easier to understand than the given behavior.
> = "This is Lua version " .. 5.1 .. " we are using." This is Lua version 5.1 we are using. > = "Pi = " .. math.pi Pi = 3.1415926535898 > = "Pi = " .. 3.1415927 Pi = 3.1415927