User Tools

Site Tools


en:foreach

This is an old revision of the document!


For Each / Next (Statement)

Format

for each variable in array
(tab)statement(s)
next variable

Description

The FOREACH and NEXT commands are used to loop through the elementf of a 1 dimensional list, or an array. Each element will be returned in the variable.

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

History

2.0.0.0New To Version
en/foreach.1587518037.txt.gz · Last modified: 2020/04/21 19:13 by admin