秤のプログラム・・改良して^^ もりの 2004/02/10 23:06:51
秤のプログラム・・改良して^^ もりの 2004/02/10 23:06:51 ツリーへ
秤のプログラム・・改良して^^ |
返事を書く |
もりの 2004/02/10 23:06:51 | |
DECLARE EXTERNAL PICTURE hari OPTION ANGLE DEGREES SET BITMAP SIZE 950,950 SET WINDOW -1,1,-1,1 INPUT PROMPT "どのはかりを使いますか? 0、500g 1、1kg 2、4kg 3、5s ":e INPUT PROMPT "□s":w INPUT PROMPT "□g":aa LET f=w*1000+aa SELECT CASE e CASE 0 LET g=-(f/500*360) DRAW hari(2) WITH ROTATE(g) SET AREA COLOR 27 PLOT AREA:0.2,0.6;-0.2,0.6;-0.2,0.65;0.2,0.65 CASE 1 LET g=-(f/1000*360) DRAW hari(2) WITH ROTATE(g) SET AREA COLOR 3 PLOT AREA:0.4,0.6;-0.4,0.6;-0.4,0.8;0.4,0.8 CASE 2 LET g=-(f/4000*360) DRAW hari(2) WITH ROTATE(g) SET COLOR 23 PLOT AREA:0.4,0.6;-0.4,0.6;-0.4,1;0.4,1 CASE 3 LET g=-(f/5000*360) DRAW hari(2) WITH ROTATE(g) SET AREA COLOR 1 PLOT AREA:0.6,0.6;-0.6,0.6;-0.6,1;0.6,1 END SELECT MOUSE POLL x,y,l,r SET LINE WIDTH 6 SET AREA COLOR 38 DRAW disk WITH SCALE(0.5)*SHIFT(0,0) SET LINE COLOR 1 PLOT LINES:-0.5,0.5;0.5,0.5;0.5,-0.5;-0.5,-0.5;-0.5,0.5 PLOT LINES:-0.1,0.5;-0.1,0.6 PLOT LINES:0.1,0.5;0.1,0.6 PLOT LINES:-0.7,0.6;0.7,0.6 PLOT LINES:-0.7,0.6;-0.7,0.8 PLOT LINES:0.7,0.6;0.7,0.8 SET COLOR 5 PLOT AREA:-0.5,-0.5;-0.9,-0.8;0.9,-0.8;0.5,-0.5 SET COLOR 1 PLOT LINES:-0.5,-0.5;-0.9,-0.8;0.9,-0.8;0.5,-0.5;-0.5,-0.5 SET COLOR 4 SET TEXT FONT "MS 明朝",20 SELECT CASE e CASE 0 GOTO 1 CASE 1 GOTO 10 CASE 2 GOTO 20 CASE 3 GOTO 30 END SELECT 1 for q=0 to 450 step 50 LET o=90-q/500*360 PLOT TEXT ,AT COS(o)*0.45-0.04,SIN(o)*0.45: STR$(q) next q PLOT TEXT ,AT -0.5,-1:"※単位はグラム。" SET LINE WIDTH 2 FOR R=1 TO 360 STEP 360/50 SET COLOR 1 PLOT LINES:COS(r)*0.5,SIN(r)*0.5;COS(r)*0.48,SIN(r)*0.48 NEXT r GOTO 40 10 for q=0 to 900 step 100 LET o=90-q/1000*360 PLOT TEXT ,AT COS(o)*0.45-0.04,SIN(o)*0.45: STR$(q) next q PLOT TEXT ,AT -0.5,-1:"※単位はグラム。" SET LINE WIDTH 2 FOR R=1 TO 360 STEP 3.6 SET COLOR 1 PLOT LINES:COS(r)*0.5,SIN(r)*0.5;COS(r)*0.48,SIN(r)*0.48 NEXT r GOTO 40 20 for q=0 to 3600 step 400 LET o=90-q/4000*360 PLOT TEXT ,AT COS(o)*0.45-0.04,SIN(o)*0.45: STR$(q) next q PLOT TEXT ,AT -0.5,-1:"※単位はグラム。" SET LINE WIDTH 2 FOR R=1 TO 360 STEP 360/80 SET COLOR 1 PLOT LINES:COS(r)*0.5,SIN(r)*0.5;COS(r)*0.48,SIN(r)*0.48 NEXT r GOTO 40 |