2014-09-14 16:23 GMT+02:00 Mark Morgan Lloyd <
markmll.fpc-pas...@telemetry.co.uk>:

> I'd be far happier if there were provision for declaring a temporary
> "shortcut" symbol:
>
> with shortcut: TSomething= TreeRoot.SubDirs[Low(TreeRoot.SubDirs)]^ do
>    begin
>    shortcut.DirLogged             := true;
>    shortcut.DirHatFocus           := false;
>    shortcut.SubDirsExpanded       := true;
>

Yes, something close to alias in SQL, instead of plain elision which "with"
currently performs. This would allow for a clearer writing without the
pitfalls of the Pascal "with".

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to