Thread: luaindex type
View Single Post
05/11/14, 06:26 PM   #8
CatoTheElder
Join Date: May 2014
Posts: 44
Originally Posted by Harven View Post
Hey, there is no uint32 in lua. There is only one numerical type called number and it is 64bit double precision floating point number.

BTW, 32 bit integer range is signed :-2147483648 to 2147483647, and unsigned: 0 to 4294967295.
From the LUA reference manual: "There are eight basic types in Lua: nil, boolean, number, string, function, userdata, thread, and table."

So, back to my original point - no 'luaindex'. There is no unit32 in lua, but there is in C, which is what we're using the LUA scripting language to interact with. The application is 32 bit, so I wouldn't try passing a 64-bit value to a 32-bit application.

You're right about the integer ranges, good catch. I haven't used 0 as an integer in years. Its far more efficient to type it as a boolean/bit and save the other 31/63 bits
  Reply With Quote