David L. Nicol wrote:
> Yes, absolutely, about the semantics.
>
> About the syntax, how about just in a block behind %HASHNAME?
>
> (as long as it doesn't use $a and $b, of course )
> (or if the insta-sort thing needs "sort" written in and this doesn't)
>
> %record{
>
> $something_new = 3; # just set $record{something_new} to 3
>
> };
I abhor 'with' in Pascal/Delphi, because within the block I can't
distinguish between two properties with the same name, where one is in the
current 'with' scope, and one is in the default scope. This is one of those
few cases where VB has nicer syntax--within a 'with' block you have to
precede a property name with '.' to get the with block scope:
dim height as double
dim ws as new Excel.worksheet // 'worksheet' has a 'height' property
with ws
print .height // Accesses ws.height
print height // Accesses me.height
end with
Whatever syntax we go with to get 'with' type scoping, please let's make
sure that we can still access the default scope within the block.
- pascal-like "with" was Re: Default filehand... David L. Nicol
- Re: pascal-like "with" was Re: Default file... Dave Storrs
- Re: pascal-like "with" was Re: Default file... Johan Vromans
- Re: pascal-like "with" was Re: Default file... Dave Storrs
- Re: pascal-like "with" was Re: Default file... John Porter
- Re: pascal-like "with" was Re: Default file... Johan Vromans
- Re: pascal-like "with" was Re: Default file... Dave Storrs
- Re: pascal-like "with" was Re: Default fileh... Clayton Scott
- Re: pascal-like "with" was Re: Default fileh... Dave Storrs
- implied pascal-like "with" or "express&... David L. Nicol
- Re: implied pascal-like "with" or "expr... Jeremy Howard
- Re: implied pascal-like "with" or "expr... David L. Nicol
- Re: implied pascal-like "with" or "expr... Jonathan Scott Duff
- Re: implied pascal-like "with" or "expr... David L. Nicol
- Re: implied pascal-like "with" or "expr... Dave Storrs
- Re: implied pascal-like "with" or "expr... Brian Wheeler
- Re: implied pascal-like "with" or "expr... Jonathan Scott Duff
- Re: implied pascal-like "with" or "expr... Dave Storrs
- Re: implied pascal-like "with" or "expr... Ken Fox
- Re: implied pascal-like "with" or "expr... Jeremy Howard
- Re: implied pascal-like "with" or "expr... David L. Nicol
