|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Thu Dec 07, 2006 9:24 pm
[1.20] Nested alias expansion of %i |
I saw an interesting side effect in my script I was testing, and I pared the code down to a generic example that causes the problem to happen reliably.
Code: |
#ALIAS testforall1($list1) {
#FORALL {$list1} {
#SAY i1 is %i
}
}
#ALIAS testforall2($list2) {
#FORALL {$list2} {
#SAY i2 is %i
testforall1 blah
}
} |
Entering 'testforall2 bleh' should give the result:
i2 is bleh
i1 is blah
What I get, however, is:
i2 is bleh
i1 is bleh
The second (inner) %i isn't being expanded correctly. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Dec 07, 2006 11:35 pm |
Yes, we talked about this several months ago. In testforall2, you are really doing a nested loop, and %i points to the outerloop, while %j points to the inner loop. I haven't yet figured out how to deal with this problem, but it's on the bug list.
|
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Fri Dec 08, 2006 3:06 am |
Okay. Thanks for re-confirming it then. I look forward to the eventual fix (obviously). :)
|
|
|
|
|
|