lua-users home
lua-l archive

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

In Lua, nil is false. Any value besides nil is true.

If you return nil for false, it will work.


----- Original Message -----
From: "Denis Lamarche" <>
To: "Multiple recipients of list" <>
Sent: Wednesday, August 29, 2001 9:48 PM
Subject: Using If's

> Hi, This is what im doing:
> [LUA]
> if Check_Flag(VISIBLE)==1 then
>   Text("Yup, the flag is set")
> end
> Where Check_Flag() and Text() are both 'C' functions.  Is is possible to
> have to use the '==1' like in 'C'??  I just want it to be TRUE if
> returns something other than ZERO and FALSE if it returns ZERO.
> Denis Lamarche
> _________________________________________________________________
> Get your FREE download of MSN Explorer at