lua-users home
lua-l archive

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


> if we try to assign
> 
>    b[nil] = {}
>    
> then we get error 'table index is invalid',
> but if we try
> 
>     if b[nil] == nil then
>        ...
>     end
>     
> no error is raised. Is it correct behaviour?

Yes. In the past access to b[nil] raised an error too, but it seems
more useful to simply return nil.

-- Roberto