1 REM v0.1
10 " "LOCK :CLEAR :USING :WAIT 90:ON ERROR GOTO 900
20 PRINT "CONVERSION TO METRIC UNITS":PRINT "  Copr. 1982 Tandy Corp.":WAIT 
100 A$="":INPUT "List known units? (Y/N) ";A$
110 IF A$="N"THEN 140
120 IF A$<>"Y"THEN 100
130 PRINT "IN FT YD MI OZ LB CP":PRINT "PT QT GAL BTU DEG"
140 P$="":WAIT 0:PRINT CHR$ 34;"P";CHR$ 34;:WAIT :INPUT " to print, ENTER ";P$:IF P$="P"TEXT :CSIZE 1
200 CLS :INPUT "Amount, space, unit? ";U$:GOTO 220
210 UNLOCK :END
220 CLS :N=VAL U$:J=0:FOR I=1TO LEN U$:IF MID$ (U$,I,1)=" "LET J=I:I=LEN U$
230 NEXT I:IF J=0PRINT "No space.  Redo input.":GOTO 200
240 U$=RIGHT$ (U$,LEN U$-J)
250 RESTORE :J=0:FOR I=1TO 12:READ N$:IF N$=U$LET J=1:I=12
260 NEXT I:IF J=0PRINT "Never heard of ";U$;"s";:GOTO 200
270 GOTO N$
300 "IN"X=N*2.54:IF P$LPRINT N;" in =";X;" cm"
305 PRINT X;" cm":GOTO 200
310 "YD"X=N*.9144:IF P$="P"LPRINT N;" yds =";X;" meters"
315 PRINT X;" m":GOTO 200
320 "FT"X=N*30.48:IF P$="P"LPRINT N;" ft =";X;" cm"
325 PRINT X;" cm":GOTO 200
330 "MI"X=N*1.609344:IF P$="P"LPRINT N;" mi =";X;" km"
335 PRINT X;" km":GOTO 200
340 "LB"X=N*.45359237:IF P$="P"LPRINT N;" lb =";X;" kg"
345 PRINT X;" kg":GOTO 200
350 "OZ"X=N*28.349523:IF P$="P"LPRINT N;" oz =";X;" gm"
355 PRINT X;" gm":GOTO 200
360 "PT"X=N*.4731632:IF P$="P"LPRINT N;" pt =";X;" l"
365 PRINT X;" l":GOTO 200
370 "QT"X=N*.9463264:IF P$="P"LPRINT N;" qt =";X;" l"
375 PRINT X;" l":GOTO 200
380 "GAL"X=N*3.785306:IF P$="P"LPRINT N;" gal =";X;" l"
385 PRINT X;" l":GOTO 200
390 "CP"X=N*.2365816:IF P$="P"LPRINT N;" cp =";X;" l"
395 PRINT X;" l":GOTO 200
400 "BTU"X=N*251.99576:IF P$="P"LPRINT N;" BTU =";X;" cal"
405 PRINT X;" cal":GOTO 200
410 "DEG"X=(N-32)*5/9:IF P$="P"LPRINT N;" deg F =";X;" deg C"
415 PRINT X;" deg C":GOTO 200
500 DATA "IN","FT","YD","MI","OZ","LB","CP","PT","QT","GAL","BTU","DEG"
900 PRINT "*** ERROR";PEEK &789B;" in";STATUS 4;" ***":GOTO 200
999 END
