:montre() :Prgm :@--------initialisations :Local ss,hh :360/60->ss:360/720->hh :ClrDraw :ZoomInt :@-----------------cadran :circle 0,0,38 :circle 0,0,32 :@-------------graduations :Local i,xg1,yg1,xg2,yg2 :For i,1,12 : 32*sin(ss*i*60)->xg1 : 32*cos(ss*i*60)->yg1 : 38*sin(ss*i*60)->xg2 : 38*cos(ss*i*60)->yg2 : Line xg1,yg1,xg2,yg2 :EndFor :@-----------------montre :Local xh,yh,xm,ym,xs,ys :Local t,at:25->at:0->i :Local axh,axm,axs :Local ayh,aym,ays @-----------------moteur :Loop : Loop : getTime()->t : 30*sin(ss*t[3])->xs : 30*cos(ss*t[3])->ys : 28*sin(ss*t[2])->xm : 28*cos(ss*t[2])->ym : 22*sin(ss*int(t[2]/12)+ hh*mod(t[1],12)* 60)->xh : 22*cos(ss*int(t[2]/12)+ hh*mod(t[1],12)* 60)->yh : If at<>t[3]:Exit : Loop :@---------------aigulles : If i=0:Goto là : Line 0,0,axh,ayh,0 : Line 0,0,xh,yh,1 : Line 0,0,axm,aym,0 : Line 0,0,xm,ym,1 : Line 0,0,axs,ayx,0 : Line 0,0,xs,ys,1 : Lbl là :@-----------------sortie : getKey()->k : If k=264:Exit :@---------------bouclage : xs->axs:ys->ays : xm->axm:ym->aym : xh->axh:yh->ayh : t[3]->at:1->i :EndLoop :EndPrgm //un cadran d'horloge utilisant l'heure système