Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (CDT)

METRIC1

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. KILOMETERS TO MILES"
130 PRINT@129,"2. MILES TO KILOMETERS"
140 PRINT@161,"3. METERS/CM TO FT/INCHES"
150 PRINT@193,"4. FT/INCHES TO METERS/CM"
160 PRINT@224,"WHICH ONE";: INPUT A$
170 IF (VAL(A$)>0) AND (VAL(A$)<5) THEN A=VAL(A$): GOTO210
180 PRINT@256,"INVALID SELECTION--TRY AGAIN"
190 FOR I=1 TO 300: NEXT I
200 PRINT@234,": PRINT: G0T0160
210 ON A GOSUB250,300,350,410
220 PRINT@480,"PRESS R TO RESTART";: A$=INKEY$
230 IF A$="R" THEN 100
240 G0T0220
250 A1$="KILOMETERS": A2$="MILES"
260 GOSUB490
270 A2=A1*.621
280 GOSUB580
290 RETURN
300 A1$="MILES": A2$="KILOMETERS"
310 GOSUB490
320 A2=A1*1.609
330 GOSUB580
340 RETURN
350 A1$="METERS": B1$="CM": A2$="FT": B2$="INCHES"
360 GOSUB490: GOSUB530
370 A1=(A1*39.37)+(B1*.3937): REM-METERS/CM TO INCHES
380 A2=INT(A1/12): B2=A1-(A2*12)
390 GOSUB580: GOSUB610
400 RETURN
410 A1$="FT": B1$="INCHES": A2$="METERS": B2$="CM"
420 GOSUB490: GOSUB530
430 A1=(A1*12)+B1: REM-FT/INCHES TO INCHES
440 A2=INT(A1/39.37)
450 B2=(A1-(A2*39.37))/.3937
460 GOSUB580: GOSUB610
470 RETURN
480 REM -- INPUT SUBROUTINES
490 PRINT@384,A1$;: INPUT B$
500 IF (VAL(B$)=>0) AND (VAL(B$)<10000) THEN A1=VAL(B$): GOTO520
510 PRINT@384,"": GOTO49O
520 RETURN
530 PRINT@400,B1$;: INPUT B$
540 IF (VAL(B$)=>0) AND (VAL(B$)<10000) THEN B1=VAL(B$): GOTO560
550 PRINT@400,": GOTO530
560 RETURN
570 REM -- OUTPUT SUBROUTINES
580 A2=INT(A2*100): B$=STR$(A2): L=LEN(B$)
590 PRINT@416,A2$;"=";LEFT$(B$,L-2) ;".";RIGHT$(B$,2)
600 RETURN
610 B2=INT(B2*100): B$=STR$(B2): L=LEN(B$)
620 PRINT@432 ,B2$;"=" ;LEFT$(B$,L-2) ; "." ;RIGHT$(B$,2)
630 RETURN