loop statements

 

VBA Code Protection > Supported VBA syntax by compiler > loop statements

 

Possible syntax are:

 

DO WHILE expr statements LOOP

DO UNTIL expr statements LOOP

DO statements LOOP WHILE expr DO statement LOOP UNTIL expr

 

Statements will be executed WHILE expr is true, or UNTIL expr is true. if expr is before statements, then the control condition will be tested before iteration. Otherwise, control condition will be tested after iteration. Examples:

DO

   K = I mod J

I = J

J = K

LOOP UNTIL J = 0

 

DO

I = I mod J

I = J

J = K

LOOP WHILE J <> 0

 

DO WHILE I < 0

 …

LOOP

 

 

for statements

 

 


Copyright © 2021 G.D.G. Software