Current Page:
NeXtMidas Training
Macros - Part 1 (Basics)
Loops and Control Structures
Loops
Summary
|
|
- Loop Summary:
Loop |
Syntax |
Comparable Java Loop |
In X-Midas? |
DO |
DO i start end inc
...
ENDDO |
for(int i=start; i<=end; i+=inc) {
...
} |
No |
LOOP |
(NeXtMidas 2.5.0 and later)
LOOP end i
...
ENDLOOP
|
for(int i=1; i<=end; i++) {
...
} |
Yes |
WHILE |
WHILE <test case>
...
ENDWHILE |
while(<test case>) {
...
} |
Yes |
FOREACH |
FOREACH key inTable table
...
ENDFOR |
(Java 5 and later*)
for(String key : table.getKeys()) {
...
} |
No |
FORALL |
forall #=start:end;inc ... |
for(int i=start; i<=end; i+=inc) {
...
} |
Yes |
Java Experts Take Note: |
NeXtMidas does not have a loop that directly matches the (infrequently-used)
do...while loop found in Java.
|
|
|
|