I'm not really sure if this is what you're aiming after, but this is my shot: :1->I:1->J :While ((I<sqrt(c))and(J<sqrt(a))) Do stuff :I+1->I:J+1->J :End This should keep the loop running and increment both varibles each time the loop runs. I haven't tested the 'and' statement, but it should work. -Joseph Have A :-) Nice Day