Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Instructions

Looping Instructions

Scroll Prev Up Next More

Looping instructions allow you to execute a block of code repeatedly until a certain condition is met.

 

There are 2 types of loops:

 

for

The for loop allows you to loop over an integer counter variable which runs over a preset range of values.

while

The while loop allows you to loop while a Boolean expression remains true.

 

Each of these loops is more or less suitable, depending on the circumstances, as we will see in the following sections.

 

See also: branching instructions.