lua-users home
lua-l archive

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


RLake@oxfam.org.uk wrote:
> 
>     if table[key] == nil then ...
>
>     if rawequals(table[key], nil) then ...

That gives the question what happens to 'not', 'and', 'or',
'if', 'while', etc.  Do they use equality or identity against
nil and false?  What about the transformations done by the
compiler ('if a' to 'if not a skip_to_else')? [1]

And all that because of the NaN stuff which cannot be handled
in ANSI89-C anyway??? [2]

Ciao, ET.


[1] 'exp' and 'not exp' may both be false, so 'if a then b else c'
is not the same as 'if not a then c else b')

Shouldn't it then be possible that neither the true nor the false
part of an 'if-then-else' is executed? ;->

[2] ... unless you write your own fp-routines.