I've learned that with each 'foreach', CAL starts the loop again from the beginning of the selected events.
However, in the code below, I enter some events and in the second foreach loop, they do not appear.
(do
(int a 0)
(forEachEvent
(while (< a 3)
(do
(pause "pass 1:" Event.Kind ";" Event.Time)
(insert Event.Time Event.Chan WHEEL a)
(++ a)
)
)
)
(forEachEvent
(pause "pass 2:" Event.Kind ";" Event.Time)
)
)
How do I get the inserted events to appear for a next foreach?