lua-users home
lua-l archive

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


On 14 March 2011 11:14, David Kastrup <dak@gnu.org> wrote:
> Axel Kittenberger <axkibe@gmail.com> writes:
>
>>> In C/C++ I would write !!condition. In  Lua "not not condition" ?
>>
>> I'm not sure how the ! operation is exactly defined in C(++)
>> standards,

You could try just reading the standards; speculation here is worse
than futile, as it only encourages foolishness.

ISO C99:

       [#5]  The  result of the logical negation operator ! is 0 if
       the value of its operand compares unequal to  0,  1  if  the
       value  of  its  operand compares equal to 0.  The result has
       type int.  The expression !E is equivalent to (0==E).

-- 
http://rrt.sc3d.org