[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: string.format(""%x",5.5)
- From: Ernest Ewert <Ernest.Ewert@...>
- Date: Thu, 1 Dec 2011 16:55:15 +0000
The Lua 5.2 change document makes a suggestion that Lua 5.2 has "support for hexadecimal floats."
When I try:
local ok, v = pcall(string.format," --[[ 0x%x ]]",5.5)
if ok then return v else return "" end
It does not work and Lua complains about the value not being in proper range.
I am OK with this behavior, but I wanted to know if the ~intent~ was to support it.