10 REM Same generator as generators_foreach.bas, via DO EACH ... LOOP.
20 DIM OBJ#(3)
30 OBJ#(0) = 100
40 OBJ#(1) = 200
50 OBJ#(2) = 300
60 GEN ROOMOBJECTS(R#)
70     FOR I# = 0 TO 2
80         IF I# <> 1 THEN EMIT OBJ#(I#)
90     NEXT I#
100 END GEN
110 DO EACH O# IN ROOMOBJECTS(0)
120     PRINT O#
130 LOOP
140 PRINT "DONE"
