===== For Each / Next (Statement) =====
==== Format ====
**for each** [[variables|variable]] **in** [[Arrays|array]] \\
(tab)[[programsyntax|statement(s)]]\\
**next** [[variables|variable]]
**for each** [[variables|key]] **in** [[Maps|map]] \\
(tab)[[programsyntax|statement(s)]]\\
**next** [[variables|variable]]
**for each** [[variables|key]] **%%->%%** [[variables|value]] **in** [[Maps|map]] \\
(tab)[[programsyntax|statement(s)]]\\
**next** [[variables|variable]]
==== Description ====
The FOREACH and NEXT commands are used to loop through the elementf of a list, an array, or a maap. Each element will be returned in the variable.
If the array is two dimensional it will be traversed through the columns of row one then row two...
==== Example ====
for each i in {1,2,3,4}
print i
next i
x = {'a','b','c'}
for each i in x
print i
next i
displays
1
2
3
4
a
b
c
==== See Also ====
{{page>en:start#Program Control&noheader}}
==== History ====
|2.0.0.0|New To Version|