declaring variants/subports in loops and loop variables
Brandon Allbery
allbery.b at gmail.com
Wed Dec 7 17:56:56 CET 2016
On Wed, Dec 7, 2016 at 5:51 PM, René J.V. Bertin <rjvbertin at gmail.com>
wrote:
> On Wednesday December 07 2016 17:09:35 Brandon Allbery wrote:
> > Use a double quoted string and escape anything that needs it (but
> > specifically not those variables for which you need the current value).
>
> I don't think that's going to make things much more readable, would it?
>
It won't, but that's the best you will do in a stringy language like Tcl
(or shells, for that matter).
> How would it know which ones to uplevel?
>
> Not "which ones", just `uplevel 1 $code`, just like `proc platform` does.
>
I don't think that will work; you're looking for a closure here where $pv
and $pdv are captured from where the variant is declared, and any other $s
are either local or uplevel-ed to where the variant is *run* from.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20161207/e55e4d1b/attachment.html>
More information about the macports-dev
mailing list