[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 'with' statement
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 9 Mar 2016 09:19:09 -0300
> 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