for counter initvalue finalvalue [step] (tab)statements (tab)...
Can be single line:
for(counter initvalue finalvalue [step]) statements
counter - counter variable. Type - int, long, lpstr or pointer.
initvalue - initial counter value. Type - type of counter.
finalvalue - final counter value. Type - type of counter.
step - value to add to counter after each loop. Type - int. Default: 1.
Repeatedly executes statements, after each loop adding 1 (or step) to counter variable.
Assigns initvalue to counter, and, while counter < finalvalue, repeatedly executes statements. After each loop adds step to counter. If step is negative, executes statements while counter > finalvalue.
Use break to exit loop. Use continue to skip following statements.
If you don't need counter variable, use rep.
See also: foreach
lpstr s = "abcd.ef" int i int j = len(s) for i 0 j out i if s[i] = '.' break for(i 0 j) out i; if(s[i] = '.') break