| Start |
|---|
Simple Loop |
| WHILE Loop The WHILE loop is executed untill the condition of end is fulfilled. Simple example: This loop will be executed untill current value of variable v_counter will be less than ten. The result: The most important thing is, that our loop starts with '0' value, so first line of results is 'Current iteration of loop is 0'. |
| FOR Loop Loop FOR works on similar rules as other loops. FOR loop is executed exact number of times and this number is known at the beginning - lower and upper limits are directly set in code. In every step in this example, loop is increment by 1. Simple example: And the result is: Loop FOR has additional property, which is working in reverse. Using additional word 'REVERSE' in declaration of lower and upper limit of loop allow to do that. Every execution of loop decrement value of v_counter by 1. Example: And the result: Syntax
|
Read Article
https://develop.horje.com/learn/1434/reference