Is it possible to use more than 2 variable in a for loop.
i tried this
for(integer j=0, k=1; j<iSize.size(); j++, k++) {
}
and getting this error
Error: Compile Error: expecting a right parentheses, found ‘,’ at line 188 column 53
Please help me to find the solution.
Thanks
Anu
No, in this case since there is only one condition to end the loop you could write the following:
if you actually needed two loops you could do
Following either of these suggestions should clear up that error. [Edit] The code you have now is in an incorrect format and the compiler is expecting the closing paren since you can only put 1 statement at the end of the for loop and you have 2.