#runtime "hsp3cl" #module Generator co,value,c #modcfunc gNext gosub co return value #global #module myGen@Generator co,value,c #define ctype g(%1) %1@Generator #modinit c=0 newlab co,1:return *gLoop g(c)++ g(value)=g(c) newlab g(co),1:return goto*gLoop return #global #module Program #deffunc main newmod g,myGen@Generator newmod g2,myGen@Generator repeat 100 mes gNext(g) mes gNext(g2) loop return #global main