lua-users home
lua-l archive

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


On 11/20/08, Matthew Paul Del Buono <delbu9c1@erau.edu> wrote:
> Hi list,
>
> [..snip..]
>
>  I see that it should be executing the line "return (h(op1, op2))" but that's not what I seem to get in response. I would expect "true" to be the result if the manual stated "return not not (h(op1, op2))" but it doesn't.
>
>  Is this a manual problem, a Lua problem, or am I missing something?
>

Apparently, the manual and the actual Lua implementation do differ.

In the function "luaV_equalval" defined in  "lvm.c" the last two line are

  callTMres(L, L->top, tm, t1, t2);  /* call TM */
  return !l_isfalse(L->top);

that essentially mean "return not not (h(op1, op2))" as you correctly guessed.
It is different from the pseudo-code in the manual. I would suggest to
correct the manual.

--Leo--