Delta ISPSoft — 13.2.6 Loop Structure - FOR

ISPSoft User Manual  Example Example 1: The initial value of DT1 is 0. In the loop structure, the value of DT1 increases progressively by 2. The loop will not be terminated until the value of DT1 is larger than 100. Example 2: The REPEAT loop checks the Boolean expression after the sub-statement is executed. The sub-statement in the REPEAT structure is executed once. After the REPEAT loop is terminated, the value in D0 will become 1. The WHILE loop checks the Boolean expression before the sub-statement is executed. The Boolean expression in the WHILE structure is evaluated as FALSE, and therefore the sub-statement in the WHILE structure is not executed.

After the WHILE loop is terminated, the value in D1 will still be 0. 13.2.6 Loop Structure - FOR  Format 13-20