Tag identifier
FOR
Easy XML
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3
Meaning
For loop
for (initialization; test; continuation) instruction(s)
Syntax:
<FOR>
<INIT>...</INIT>
<CONDITION>...</CONDITION>
<INCREMENT>...</INCREMENT>
Instructions
...
</FOR>
The For loop is executed as follows:
1. Evaluation of the expression initialization (INIT).
2. Evaluation of the expression test (CONDITION) as a Boolean expression.
If the value is false, the For loop is exited.
3. Execution of the following instructions.
4. Evaluation of the expression continuation (INCREMENT).
5. Continue with 2.
All the variables within the INIT, CONDITION, and INCREMENT branches are declared
and initialized outside the FOR loop.
Example:
<LET name = "count">0</LET>
<FOR>
<INIT>
<OP> count = 0</OP>
</INIT>
<CONDITION> count <= 7 </CONDITION>
<INCREMENT>
<OP> count = count + 1 </OP>
</INCREMENT>
<OP> "plc/qb10" = 1+ count </OP>
</FOR>
Generating user dialogs
1.6 XML identifier
21