RosettaCodeData/Task/Loops-For-with-a-specified-step/M2000-Interpreter/loops-for-with-a-specified-step-2.m2000
2023-07-01 13:44:08 -04:00

15 lines
355 B
Text

a=("A", "B", "C", "D", "E", "F", "Z")
k=Each(a)
While k {
Print Array$(k),
k=Each(a, k^+2) ' set start again
}
Print
\\ a list of keys (unique keys allowed)
Inventory b="A", "B", "C", "D", "E", "F", "Z"
k=Each(b)
While k {
Print Eval$(k), ' return keys as values, because no value exist yet for each key.
k=Each(b, k^+2)
}
Print