sivaramanm Posted April 3, 2014 Posted April 3, 2014 I have an requirement to loop through multiple Arrays in a single loop[Arrays itself]. So just wondering if the following is possible (Actually when tested it prints nothing though there was no syntax error! Global $MMEList[3] = ["LSMC1-MME0001-CST","LSMC1-MME0004-CST","LSMC1-MME0010-CST"] Global $SGWList[3] = ["LSMC1-MME0001-CST","LSMC1-MME0004-CST","LSMC1-MME0010-CST"] Global $NEType[2] = ["MME","SGW"] For $i=0 To 2 ConsoleWrite(Eval($NEType[$i] & "List[" & $i &"]")) Next Exit
Solution sahsanu Posted April 3, 2014 Solution Posted April 3, 2014 You could try to use Execute instead of Eval: Global $MMEList[3] = ["LSMC1-MME0001-CST", "LSMC1-MME0004-CST", "LSMC1-MME0010-CST"] Global $SGWList[3] = ["LSMC1-MME0001-CST", "LSMC1-MME0004-CST", "LSMC1-MME0010-CST"] Global $NEType[2] = ["MME", "SGW"] For $i = 0 To 1 ConsoleWrite("The content of " & "$" & $NEType[$i] & "List[" & $i & "] is: ") ConsoleWrite(Execute("$" & $NEType[$i] & "List[" & $i & "]") & @CRLF) Next Exit Cheers, sahsanu sivaramanm 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now