lua-users home
lua-l archive

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


On Tue, May 12, 1998 at 09:14:06AM -0300, Luiz Henrique de Figueiredo wrote:
> >Okay, I know this has come up as a discussion before, and the general
> >concensus was that integers were not necessary. However, I'm starting to
> >use Lua in a project where not having integers is going to make my life
> >difficult. I think lua is the right tool for the job, but it'll be much
> >nicer if Lua has integers.
> 
> if you do not need real numbers, then you can #defeine real to be long
> and everything should work, in Lua 3.1.

I did this, and it is still uncapable of handling unsigned 32bits.

#define real unsigned long

In C I do:   lua_pushnumber(0xFeBff008);

In Lua, I do:   write(format("0x%X",num));

I get:

0x80000000

> In 3.1, you can also write X"0x44544a". this is sugar for X("0x44544a").

That will help, thanks.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net