declaring variants/subports in loops and loop variables
Brandon Allbery
allbery.b at gmail.com
Wed Dec 7 17:46:21 CET 2016
On Wed, Dec 7, 2016 at 5:42 PM, René J.V. Bertin <rjvbertin at gmail.com>
wrote:
> > This is almost exactly the same situation as:
> >
> > foreach foo {bar baz} {
> > proc p_$foo {} {
> > puts $foo
> > }
> > }
> > p_bar
> > p_baz
>
> Huh? This complains about foo not being known, I think there should be a
> `global foo` in that procedure?
>
That would do a different wrong thing, specifically the one you originally
complained about.
> I was expecting something like that but apparently this is not achieved
via uplevel in `proc variant`?
How would it know which ones to uplevel?
--
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/585187bf/attachment.html>
More information about the macports-dev
mailing list