Sharp PC-E500/E500S Technikersoftware

M-CONV.212

Metrische Umwandlung

M-CONV.212 (6.927 Bytes)

10 ' METRIC.212 (Metric Conversion)
15 CLEAR
20 MERGE "G:COMN.00$">G:COMN.00$"
30 ON ERROR GOTO *ERR
40 GOSUB *CG:ERASE R4,R6,P8,Q8,Q5,QE1$,QNV$
50 ' m,in,ft,yd,mile,cm,A,pc
60 QXL=8:DIM R4(QXL-1,QXL-1)
70 ' m2,a,acre,mile2
80 QXR=4:DIM R6(QXR-1,QXR-1)
90 ' cm3,m3,in3,l,ft3
100 QXV=5:DIM P8(QXV-1,QXV-1)
110 ' g,kg,oz,lb
120 QXW=4:DIM Q8(QXW-1,QXW-1)
130 ' eV,erg,cm-1,Hz,K,G,j/mol,kcal/mol
140 QXN=8:DIM Q5(QXN-1,QXN-1)
150 ' length
160 R4(0,0)=1:R4(0,1)=39.3701:R4(0,2)=3.28084:R4(0,3)=1.09361
170 R4(0,4)=0.000621371:R4(0,5)=100:R4(0,6)=100000000*100:R4(0,7)=1/3.0856776E+16
180 R4(1,0)=0.0254:R4(1,1)=1:R4(1,2)=0.0833333:R4(1,3)=0.0277778
190 R4(1,4)=1.57828E-05:R4(1,5)=2.54:R4(1,6)=100000000*2.54:R4(1,7)=1/3.0856776E+18*2.54
200 R4(2,0)=0.3048:R4(2,1)=12:R4(2,2)=1:R4(2,3)=0.333333
210 R4(2,4)=0.000189394:R4(2,5)=30.48:R4(2,6)=100000000*30.48:R4(2,7)=1/3.0856776E+18*30.48
220 R4(3,0)=0.9144:R4(3,1)=36:R4(3,2)=3:R4(3,3)=1
230 R4(3,4)=0.000568182:R4(3,5)=91.44:R4(3,6)=100000000*91.44:R4(3,7)=1/3.0856776E+18*91.44
240 R4(4,0)=1609.344:R4(4,1)=63360:R4(4,2)=5280:R4(4,3)=1760
250 R4(4,4)=1:R4(4,5)=160934.4:R4(4,6)=100000000*160934.4:R4(4,7)=1/3.0856776E+18*160934.4
260 R4(5,0)=0.01:R4(5,1)=0.393701:R4(5,2)=0.0328084:R4(5,3)=0.0109361
270 R4(5,4)=6.21371E-06:R4(5,5)=1:R4(5,6)=100000000:R4(5,7)=1/3.0856776E+18
280 R4(6,0)=0.00000001/100:R4(6,1)=0.00000001*0.393701:R4(6,2)=0.00000001*0.0328084:R4(6,3)=0.00000001*0.0109361
290 R4(6,4)=0.00000001*0.00000621371#:R4(6,5)=0.00000001:R4(6,6)=1:R4(6,7)=1/3.0856776E+18*0.00000001
300 R4(7,0)=3.0856776E+16:R4(7,1)=3.0856776E+16*39.3701:R4(7,2)=3.0856776E+16*3.28084:R4(7,3)=3.0856776E+16*1.09361
310 R4(7,4)=3.0856776E+16*0.000621371:R4(7,5)=3.0856776E+16*100:R4(7,6)=3.0856776E+16*1E+10:R4(7,7)=1
320 ' area
330 R6(0,0)=1:R6(0,1)=0.01:R6(0,2)=0.000247105:R6(0,3)=3.86102E-07
340 R6(1,0)=100:R6(1,1)=1:R6(1,2)=0.0247105:R6(1,3)=3.86102E-05
350 R6(2,0)=4046.86:R6(2,1)=40.4686:R6(2,2)=1:R6(2,3)=0.0015625
360 R6(3,0)=2589990:R6(3,1)=25899.9:R6(3,2)=640:R6(3,3)=1
370 ' volume
380 P8(0,0)=1:P8(0,1)=0.000001:P8(0,2)=0.0610237:P8(0,3)=0.001:P8(0,4)=3.53147E-05
390 P8(1,0)=1000000:P8(1,1)=1:P8(1,2)=61023.7:P8(1,3)=1000:P8(1,4)=35.3147
400 P8(2,0)=16.3871:P8(2,1)=1.63871E-05:P8(2,2)=1:P8(2,3)=0.0163871:P8(2,4)=0.000578704
410 P8(3,0)=1000:P8(3,1)=0.001:P8(3,2)=61.0237:P8(3,3)=1:P8(3,4)=0.0353147
420 P8(4,0)=28316.8:P8(4,1)=0.0283168:P8(4,2)=1728:P8(4,3)=28.3168:P8(4,4)=1
430 ' weight
440 Q8(0,0)=1:Q8(0,1)=0.001:Q8(0,2)=0.035274:Q8(0,3)=0.00220462
450 Q8(1,0)=1000:Q8(1,1)=1:Q8(1,2)=35.274:Q8(1,3)=2.20462
460 Q8(2,0)=28.3495:Q8(2,1)=0.0283495:Q8(2,2)=1:Q8(2,3)=0.0625
470 Q8(3,0)=453.59237:Q8(3,1)=0.45359237:Q8(3,2)=16:Q8(3,3)=1
480 ' energy
490 Q5(0,0)=1:Q5(0,1)=1.60218E-12:Q5(0,2)=8065.54:Q5(0,3)=2.41799E+14
500 Q5(0,4)=11604.5:Q5(0,5)=172760000:Q5(0,6)=96485.3:Q5(0,7)=23.0492
510 Q5(1,0)=6.24151E+11:Q5(1,1)=1:Q5(1,2)=5.03411E+15:Q5(1,3)=1.50919E+26
520 Q5(1,4)=7.24292E+15:Q5(1,5)=1.07828E+20:Q5(1,6)=6.02214E+16:Q5(1,7)=1.43862E+13
530 Q5(2,0)=0.000123984:Q5(2,1)=1.98645E-16:Q5(2,2)=1:Q5(2,3)=2.99792E+10
540 Q5(2,4)=1.43877:Q5(2,5)=21419.5:Q5(2,6)=11.9627:Q5(2,7)=0.00285774
550 Q5(3,0)=4.13567E-15:Q5(3,1)=6.62608E-27:Q5(3,2)=3.33564E-11:Q5(3,3)=1
560 Q5(3,4)=4.79922E-11:Q5(3,5)=7.14478E-07:Q5(3,6)=3.99031E-10:Q5(3,7)=9.53241E-14
570 Q5(4,0)=8.61738E-05:Q5(4,1)=1.38066E-16:Q5(4,2)=0.695039:Q5(4,3)=2.08367E+10
580 Q5(4,4)=1:Q5(4,5)=14887.4:Q5(4,6)=8.31451:Q5(4,7)=0.00198624
590 Q5(5,0)=5.78838E-09:Q5(5,1)=9.27402E-21:Q5(5,2)=4.66864E-05:Q5(5,3)=1399620
600 Q5(5,4)=0.000067171:Q5(5,5)=1:Q5(5,6)=0.000558494:Q5(5,7)=1.33418E-07
610 Q5(6,0)=1.03643E-05:Q5(6,1)=1.66054E-17:Q5(6,2)=0.0835934:Q5(6,3)=2506070000
620 Q5(6,4)=0.120272:Q5(6,5)=1790.53:Q5(6,6)=1:Q5(6,7)=0.000238889
630 Q5(7,0)=0.0433854:Q5(7,1)=6.9511E-14:Q5(7,2)=349.926:Q5(7,3)=1.04905E+13
640 Q5(7,4)=503.463:Q5(7,5)=7495250:Q5(7,6)=4186.05:Q5(7,7)=1
650 '
660 DIM QE1$(4,10):QDB$=CHR$ &DB:QC3$=CHR$ &C3:QC4$=CHR$ &C4:QC2$=CHR$ &C2:QCB$=CHR$ &CB:QBC$=CHR$ &BC
670 QE1$(0,0)="[  m   ]":QE1$(0,1)="[  in  ]":QE1$(0,2)="[  ft  ]":QE1$(0,3)="[  yd  ]"
680 QE1$(0,4)="[ mile ]":QE1$(0,5)="[  cm  ]":QE1$(0,6)="[  "+QDB$+"   ]":QE1$(0,7)="[  pc  ]"
690 QE1$(1,0)="[  m"+QC3$+"  ]":QE1$(1,1)="[  a   ]"
700 QE1$(1,2)="[ acre ]":QE1$(1,3)="[ mile"+QC3$+"]"
710 QE1$(2,0)="[  cm"+QC4$+" ]":QE1$(2,1)="[  m"+QC4$+"  ]"
720 QE1$(2,2)="[  in"+QC4$+" ]":QE1$(2,3)="[  l   ]":QE1$(2,4)="[  ft"+QC4$+" ]"
730 QE1$(3,0)="[  g   ]":QE1$(3,1)="[  kg  ]":QE1$(3,2)="[  oz  ]":QE1$(3,3)="[  lb  ]"
740 QE1$(4,0)="[  eV  ]":QE1$(4,1)="[ erg  ]":QE1$(4,2)="[ cm"+QCB$+QC2$+" ]":QE1$(4,3)="[  Hz  ]"
750 QE1$(4,4)="[  K   ]":QE1$(4,5)="[  G   ]":QE1$(4,6)="[ J/mol]":QE1$(4,7)="[kcal/mol]"
760 '
770 DIM QNV$(4):QNV$(0)="<LENGTH>":QNV$(1)="<AREA>":QNV$(2)="<VOLUME>"
780 QNV$(3)="<WEIGHT>":QNV$(4)="<ENERGY>"
790 QFN$="[LENGTH][ AREA ][VOLUME][WEIGHT][ENERGY]"
800 O2$="*  METRIC CONVERSION  *"
810 QX$="X=":QFQ$="from ?":QFF$="from  ":QTQ$="to ?":QTT$="to   "
820 CLS :LOCATE 9,0:PRINT O2$:LOCATE 0,3:PRINT QFN$
830 P1$=INKEY$ &1:P1=ASC P1$
840 QFN=1:QCU=QXL:IF P1=&F1 THEN 900
850 QFN=2:QCU=QXR:IF P1=&F2 THEN 900
860 QFN=3:QCU=QXV:IF P1=&F3 THEN 900
870 QFN=4:QCU=QXW:IF P1=&F4 THEN 900
880 QFN=5:QCU=QXN:IF P1<>&F5 THEN 830
890 '
900 P2$="":GOSUB 990:LOCATE 13,1:PRINT QX$;" ";:INPUT P2$:IF P2$="" THEN 820
920 P2=EVAL P2$
930 GOSUB 990:LOCATE 13,1:PRINT QX$;P2:GOSUB 1000:LOCATE 2,2:PRINT QFQ$:GOSUB 1010:R2=P3
940 GOSUB 1000:LOCATE 2,2:PRINT QFF$;QE1$(QFN-1,R2-1);"   ";QTQ$
950 P1$=INKEY$ :IF P1$<>"" THEN 950
960 GOSUB 1010:Q7=P3:GOSUB 1000:LOCATE 2,2:PRINT QFF$;QE1$(QFN-1,R2-1);"   ";QTT$;QE1$(QFN-1,Q7-1)
970 GOSUB 1180:P7=P2*Q9:GOSUB 980
975 QFK$=STR$ P2:QY=4:GOSUB 1240:QFK$=STR$ P7:QY=20:GOSUB 1240
976 GOSUB *REK:GOTO 900
980 LOCATE 0,3:PRINT "                                        ":RETURN
990 CLS :LOCATE 9,0:PRINT O2$:LOCATE 1,1:PRINT QNV$(QFN-1):RETURN
1000 IF QCU>5 THEN LOCATE 0,2:PRINT QBC$
1005 LOCATE 2,2:RETURN
1010 QI=0:QC1=5:QC2=QI
1020 IF QCU>5 THEN QC2=QCU-5
1030 IF QCU<=5 THEN QC1=QCU
1040 GOSUB 980:GOSUB 1150
1050 Q1$=INKEY$ &1
1060 WAIT 10:PRINT "";:WAIT 0
1070 IF Q1$=CHR$ &1THEN 1110
1080 IF Q1$<CHR$ &F1 THEN 1050
1090 P3=QI+ASC Q1$-240:IF P3>QCU THEN 1050
1100 RETURN
1110 IF QI=0 THEN 1130 ELSE QI=0:GOTO 1040
1120 '
1130 IF QCU<=5 GOTO 1050
1140 QI=5:GOTO 1040
1150 QN1=QC1:IF QI=5 THEN QN1=QC2
1160 FOR P6=0 TO QN1-1:LOCATE P6*8,3:PRINT QE1$(QFN-1,P6+QI):NEXT :RETURN
1170 '
1180 ON QFN-1 GOTO 1200,1210,1220,1230
1190 Q9=R4(R2-1,Q7-1):RETURN
1200 Q9=R6(R2-1,Q7-1):RETURN
1210 Q9=P8(R2-1,Q7-1):RETURN
1220 Q9=Q8(R2-1,Q7-1):RETURN
1230 Q9=Q5(R2-1,Q7-1):RETURN
1240 QY=QY+7:R1=INT (LEN QFK$/2):QY=QY-R1:LOCATE QY,3:PRINT QFK$:RETURN
2000 *ERR
2010 IF ERL =900 OR ERL =920 RESUME 900
2020 CLS :LOCATE 9,0:PRINT O2$:GOSUB *DPA:GOSUB *REK:RESUME 900

Generated by (c) Casio FX-850P/FX-880P Notepad 2.02

(c) by mani.becker@web.de - http://blog.manib.bplaced.net