declaring variants/subports in loops and loop variables

René J.V. Bertin rjvbertin at gmail.com
Wed Dec 7 17:51:20 CET 2016


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?

I did notice one sometimes has to do this with the variant description (variant foo description "bla bla") but 

variant foo description "bla bla" "
	\variant \stuff \here \
"

doesn't really help (me).


> That [adding global foo] would do a different wrong thing, specifically the one you originally
> complained about.

I though Joshua's intention was to show that the two procedures print the last known value of foo, not that they complain about an unknown variable because they expect it in their local frame.

> How would it know which ones to uplevel?

Not "which ones", just `uplevel 1 $code`, just like `proc platform` does.

R


More information about the macports-dev mailing list