On Thu, Jan 24, 2013 at 10:05 PM, David Korn <[email protected]> wrote:
> cc: [email protected]
> Subject: Re: [ast-users] nameref confusion--not expanding as expected?
> --------
>
> This is caused by a for loop optimizer bug. It treated $v as a loop
> invariant. I am looking for a solution.
As said in the other email in this thread this doesn't seem to be a
bug (like script coding error) ...
... how would a possible solution look like and not break things like this...
-- snip --
typeset -a ar=( a1 b2 c3 )
nameref n=foo
for n in "${ar[@]}" ; do
print "$foo"
done
-- snip --
... where the nameref "n" just aliases a single variable used in all
for-loop passes (and not multiple ones like in Aaron's example) ? How
should a solution work if all this is done dynamically, e.g. using
"if" statements which re-declare the nameref "n" between loop passes ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users