lua-users home
lua-l archive

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


> Pascal introduced the construction
> 
> with tbl do
> ...
> end
> 
> Inside the do block, fields of 'tbl' shadow outer variables.
> 
> [...]
> 
> Problem 1: Local variables defined outside the `for` stay visible.

With due respect to Pascal, I think this is a good thing. It is weird
that something invisible, probably declared somewhere else, takes
precedence over something visible, declared in the same chunk.

-- Roberto