PDA

View Full Version : CAL writing problem...


MCT
06-09-2002, 12:23 AM
Hello

I'm trying to make a CAL program, but I got a little problem. How can I make
a loop. I meen that I have small program which I wanna run several times
(totally 256 times, once for each track)

Is there some kind of "for - next" loop (like in Basic), or what? I
couldn't find anything in Cakewalk Help-file.

Please help me

MCT

(sorry about my english)

Lord Wan
06-10-2002, 02:30 AM
Hello,

Most of the time, you won't need an EXPLICIT loop in your script. If you look at CAL samples, you'll see they use the forEachEvent statement, then check / modify each Event object.

If ever this feature does not fit your needs, the old fashionned loop is 'while' :
(do
(int i 0)
(while (< i 256)
(do
;... your code here
(++ i) ; don't forget this!!
)
)
)

MCT
06-10-2002, 03:21 AM
Thanx for your reply!!!

That's just what I was looking for...