10 ! This program illustrates the concept of graphics units and user units 20 ! (as well as the SETUU and SETGU commands) by plotting a frame and a 30 ! label in both graphics and user units - using exactly the same code. 40 ! Note that the user units are scaled into a small region of the display. 50 ! Note also that the labels do NOT scale, as labels are always measured 60 ! in graphics units. 70 ! 80 INTEGER units 90 DIM a$[20] 100 ! 110 PEN 1 @ GCLEAR @ CSIZE 4 @ LINE TYPE 1 @ LORG 6 120 LOCATE 50,150,30,70 @ SCALE 0,200,0,100 130 ! 140 FOR units=1 TO 2 150 IF units=1 THEN SETUU @ a$="User Units" 160 IF units=2 THEN SETGU @ a$="Graphics Units" 170 MOVE 10,10 @ DRAW 10,90 @ DRAW 190,90 @ DRAW 190,10 @ DRAW 10,10 180 DRAW 15,15 @ DRAW 15,85 @ DRAW 10,90 @ MOVE 15,85 @ DRAW 185,85 190 DRAW 190,90 @ MOVE 185,85 @ DRAW 185,15 @ DRAW 190,10 @ MOVE 185,15 200 DRAW 15,15 210 MOVE 100,8 @ LABEL USING "K" ; a$ 220 NEXT units 230 SETUU 240 ! 250 END