[Csnd] Question re: while loop not working

I've set up various other while loops that worked ok. I'm probably doing something silly but:

instr 1

kTime init 0
kTime timeinsts
; while kTime<10 do
        printk 1, kTime
; od

endin

</CsInstruments>
;================================
<CsScore>
i1 0 12
</CsScore>
</CsoundSynthesizer>

works fine. However if I uncomment the loop Csound freezes & has to be restarted. I'm not sure why. Is it possible to have loops that use time as a condition?

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

you are not updating kTime inside the loop, so you have a never-ending loop. Csound is stuck in the first k-cycle.

Prof. Victor Lazzarini
Maynooth University
Ireland