Hi,
I'm having an issue with the extended macro function "in." In essence, I have to global macros that I combine, which may contain duplicates elements. I'm using the "in" function to determine whether it is a duplicate and if it's not a duplicate, perform some operations. If it is a duplicate, I want the code to exit the loop and move to the next element. I'm not sure how to have it determine if an element is contained within the macro, however. I keep getting "1" when I do regardless of whether that element is contained within the macro or not. Another issue that I'm having is that some names have spaces and my code seems not able to process the space even though the name is enclosed in quotes. I get an error of "invalid syntax" when it tries to do that.
It's probably easier for me to show you the code than try to explain.
This is a simpler version of my code.
Thanks in advance,
Simone
I'm having an issue with the extended macro function "in." In essence, I have to global macros that I combine, which may contain duplicates elements. I'm using the "in" function to determine whether it is a duplicate and if it's not a duplicate, perform some operations. If it is a duplicate, I want the code to exit the loop and move to the next element. I'm not sure how to have it determine if an element is contained within the macro, however. I keep getting "1" when I do regardless of whether that element is contained within the macro or not. Another issue that I'm having is that some names have spaces and my code seems not able to process the space even though the name is enclosed in quotes. I get an error of "invalid syntax" when it tries to do that.
It's probably easier for me to show you the code than try to explain.

:
global f1 "Economia_DCT" global f2 "Payment_RMT" global f3 "La Cuenta_REN" global p1 "Addida_RTM" global p2 "Tasks_Ren" global p3 "Payment_RMT" global FAC f1 f2 f3 global PFA p1 p2 p3 global ALLFAC $FAC $PFA local files foreach f of global ALLFAC { global w = "${`f'}" local dup: list $w in files if `dup'==1 { continue } local files "`files' "${w}"" di "Not a duplicate" }
Simone