0 Members and 1 Guest are viewing this topic.
EXPORT Clock()BEGIN LOCAL t,tt,h,m; LOCAL s,nums,i,x,y; LOCAL ux,uy,x1,y1,x2,y2; nums:="ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ"; // Init GUI DIMGROB_P(G1,320,240); REPEAT RECT_P(G1,#000000); FOR i FROM 1 TO 12 DO x:=152+100*SIN(i*π/6); y:=110-100*COS(i*π/6); TEXTOUT_P(CHAR(nums(i)),G1,x,y,0,#FFFF00); END; t:=Time(); tt:=HMS→(t); h:=tt; ux:=SIN(h*π/6); uy:=COS(h*π/6); x:=160+45*ux; y:=120-45*uy; x1:=160+5*uy; y1:=120+5*ux; x2:=160-5*uy; y2:=120-5*ux; TRIANGLE_P(G1,x,y,x1,y1,x2,y2,#FFFFFF,0,0); m:=IP(FP(tt)*100); ux:=SIN(m*π/50); uy:=COS(m*π/50); x:=160+90*ux; y:=120-90*uy; x1:=160+5*uy; y1:=120+5*ux; x2:=160-5*uy; y2:=120-5*ux; TRIANGLE_P(G1,x,y,x1,y1,x2,y2,#FFFFFF,0,0); s:=100*FP(tt*100); ux:=SIN(s*π/50); uy:=COS(s*π/50); x:=160+90*ux; y:=120-90*uy; x1:=160+5*uy; y1:=120+5*ux; x2:=160-5*uy; y2:=120-5*ux; TRIANGLE_P(G1,x,y,x1,y1,x2,y2,#A0A0A0,0,0); BLIT_P(G0,G1); UNTIL ISKEYDOWN(14) ;END;
You should make the program automatically change settings to radians and maybe keep the previous setting in memory if that's possible in HP PPL, for people who don't like when programs overwrite their settings, since another program (Trailblazer) requires Degree mode to be on.