lua-users home
lua-l archive

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


> ... and if I enable LUA_USE_STRTODHEX then I get errors in the scripts if I
> use hexadecimal notation:
> 
> script.lua:59: malformed number near '0x880088'

That is why LUA_WIN does not define it :)

LUA_USE_STRTODHEX controls lua_strx2number; luaconf.h explains the
issue:

  @@ lua_str2number converts a decimal numeric string to a number.
  @@ lua_strx2number converts an hexadecimal numeric string to a number.
  ** In C99, 'strtod' does both conversions. C89, however, has no function
  ** to convert floating hexadecimal strings to numbers. For these
  ** systems, you can leave 'lua_strx2number' undefined and Lua will
  ** provide its own implementation.

-- Roberto