Hi,
I want to condition on the iteration number / iteration name within a loop. I'm currently doing it something like below (simplified code):
But it's showing me errors.
What's the correct way of doing it? Thanks!
I want to condition on the iteration number / iteration name within a loop. I'm currently doing it something like below (simplified code):
Code:
foreach i in A B C D E {
...
replace x="something" if `i'=="A"
replace x="something else" if `i'=="B"
replace x="something else" if `i'=="C"
replace x="something else" if `i'=="D"
replace x="something else" if `i'=="E"
...
}
What's the correct way of doing it? Thanks!

Comment