MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

METRIC2

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 CLS: PRINT@7,"METRIC CONVERSION"
110 PRINT@64,"SELECT ONE OF THE FOLLOWING:"
120 PRINT@97,"1. GALS/QTS/PTS/OZS TO LITERS"
130 PRINT@129,"2. LITERS TO GALS/QTS/PTS/OZS"
140 PRINT@161,"3. KGS/GRAMS TO LBS/OZS"
150 PRINT@193,"4. LBS/OZS TO KGS/GRAMS"
160 PRINT@225,"5. FAHRENHEIT TO CELSIUS"
170 PRINT@257,"6. CELSIUS TO FAHRENHEIT"
180 PRINT@288,"WHICH ONE";: INPUT A$
190 IF (VAL(A$)>0) AND (VAL(A$)<7) THEN A=VAL(A$): G0T0230
200 PRINT@320,"INVALID SELECTION--TRY AGAIN"
210 FOR I=1 TO 300: NEXT I
220 PRINT@298,": PRINT: GOTO180
230 ON A GOSUB270,310,380,430,490,520
240 PRINT@480,"PRESS R TO RESTART";: A$=INKEY$
250 IF A$="R" THEN 100
260 G0T0240
270 A1$="GALS": B1$="QTS": A2$="PTS": B2$="OZS": A3$="LITERS"
280 GOSUB560: GOSUB630: GOSUB670: GOSUB710
290 A3=((A1*128)+(B1*32)+(A2*16)+B2)/33.814
300 GOSUB820: RETURN
310 A1$="LITERS": A2$="GALS": B2$="QTS": A3$="PTS": B3$="OZS"
320 GOSUB560: A1=A1*33.814
330 A2=INT(A1/128): B2=INT((A1-(128*A2))/32)
340 A3=INT((A1-(128*A2)-(32*B2))/16)
350 B3=AL-(128*A2)-(32*B2)-(16*A3)
360 GOSUB760: GOSUB790: GOSUB820: GOSUB850
370 RETURN
380 A1$="KGS": B1$="GRAMS": A2$="LBS": B2$="OZS"
390 GOSUB560: GOSUB630
400 A1=(A1*33.28)+(B1*.035): REM-KGS/GRAMS TO OZS
410 A2=INT(A1/16): B2=A1-(16*A2)
420 GOSUB760: GOSUB790: RETURN
430 A1$="LBS": B1$="OZS": A2$="KGS": B2$="GRAMS"
440 GOSUB360: GOSUB630
430 A1=(A1*16)+B1: REM-LB/OZ TO OZ
460 A2=INT(A1/33 .28)
470 B2=(A1-(A2*33 .28))/ .033
480 GOSUB760: GOSUB790: RETURN
490 A1$="FAHRENHEIT": A2$="CELSIUS"
500 GOSUB360: A2=(3/9)*(A1-32)
510 GOSUB760: RETURN
520 A1$="CELSIUS": A2$="FAHRENHEIT"
530 GOSUB360: A2=(9/5)*A1+32
540 GOSUB760: RETURN
530 REM -- INPUT SUBROUTINES
560 PRINT#384,A1$;: INPUT B$
570 IF A<3 THEN 600
580 IF VAL(B$)<10000 THEN A1=VAL(B$): GOTO 620
590 GOTO 610
600 IF (VAL(B$)=>0) AND (VAL(B$)<10000) THEN A1=VAL(B$): G0T0620
610 PRINT#384,"": GOTO360
620 RETURN
630 PRINT#400,B1$;: INPUT B$
640 IF (VAL(B$)=>0) AND (VAL(B$)<10000) THEN B1=VAL(B$): GOTO660
630 PRINT#400,"": G0T0630
660 RETURN
670 PRINT#416,A2$;: INPUT B$
680 IF (VAL(B$)=>0) AND (VAL(B$)<10000) THEN A2=VAL(B$): GOTO700
690 PRINT#416,"": GOTO670
700 RETURN
710 PRINT@432,B2$;: INPUT B$
720 IF (VAL(B$)=0) AND (VAL(B$)<10000) THEN B2=VAL(B$): GOTO740
730 PRINT#432,"": GOTO710
740 RETURN
730 REM -- OUTPUT SUBROUTINES
760 A2=INT(A2*100): B$=STR$(A2): L=LEN(B$)
770 PRINT@416,A2$;"=";LEFT$(B$,L-2);".";RIGHT$(B$,2)
780 RETURN
790 B2=INT(B2*100): B$=STR$(B2): L=LEN(B$)
800 PRINT@432,B2$;"=";LEFT$(B$,L-2);".";RIGHT$(B$,2)
810 RETURN
820 A3=INT(A3*100): B$=STR$(A3): L=LEN(B$)
830 PRINT@448,A3$;"=" ;LEFT$(B$,L-2);".";RIGHT$(B$,2)
840 RETURN
850 B3=INT(B3*100): B$=STR$(B3): L=LEN(B$)
860 PRINT@464,B3$;"=";LEFT$(B$,L-2);".";RIGHT$(B$,2)
870 RETURN