主题:[转帖]想把一个QB的程序转成vb
1 AY=“DBS”:BY=“Dai Bie Shan Dian Chang HG-1970/25.4-YM4”
2 DIM I(20),J(20),N(20),N23(5),I1(50),J1(50),N1(50),I2(50),J2(50),N2(50)
3 DIM I3(40),J3(40),N3(40),N4(10)
4 DIM MI(20),MJ(20),MN(20),NO(3)
5 DIM A0(12),A1(12),A2(12),A3(12),A4(12),A5(12),P0(12)
6 DIM B0(12),B1(12),B2(12),B3(12),B4(12),B5(12)
7 DIM AH(12),ZQ(5,5),GB(5,3,5)
8 DIM AL(4),BL(3),CL(6),DL(4),EB(2),B(6,5),A(23),E(12)
10 DATA “YM”,20873,53.18,3.60,6.35,0.96,0.46,28.30,7.15,1350
11 DATA 1970E3, 1970E3,571,1649E3,339.2,569.0,293.6,293.6,293.6
12 DATA 28.97,28.73,27.11,26.91,26.91,26.61,26.61,26.41,26.41,25.95,25.95,25.5
13 DATA
14 DATA
15 DATA
16 DATA
17 DATA
20 DATA
21 DATA
30 DATA
240 RESTORE 10
250 READ RLY,QDY,CY,HY,OY,NY,SY,AY,WY,TX1
260 READ DE,DGQ,TGQ,DZ,TZ11,TZ22,TGS,TPS,TZPS
270 READ PGS PSM2,PBF1,PD11,PD12,PD21,PD22,PP21,PP22,PGG1,PGG2
280 READ
290 READ
300 READ
310 MM=3:KJ=4.1868:KW=1.163
320 D1=65000!:D2=55000!:DZP=0:TP1=466!:TRK=325!:UPY=121!:BJX1=0.322
321 TSM1=309.4:TSM2=352.7:TGB=436.3:XDGS=0.5536:LP=0
350 T=TGS:P=PGS:HO=0:GOSUB 6300:HGS=H
360 T=TPS:P=PGS:HO=0: GOSUB 6300:HGS=H
365 T=TZPS:P=PZ11+1:HO=0:GOSUB 6300:HZPS=H
370 T=TGQ:P=PGG2:HO=0:GOSUB 6300:HGQ=H
380 T=TZ11:P=PZ11:HO=0:GOSUB 6300:HZ1=H
390 T=TZ22:P=PGZ2:HO=0:GOSUB 6300:HZ2=H
400 QKA=(DGQ-D1-D2)*(HGQ-HGS)+(D1+D2)*(HGQ-HPS)+DZ*(HZ2-HZ1)+DZP*(HZ2-HZPS)
410 QKA=QKA/4.1868:QDY/4.1868
420 IF(DGQ/DE)>.75 GOTO 500
430 ’RM=RM+(.75-DGQ/DE)
440 RLD=RLD*DE/DGQ:RRX=(DE/DGQ)^.5
450 RDZ=RDZ*RRX:RGZ=RGZ*RRX:RRX:RGG=RGG*RRX:RDG=RDG*RRX:RSM=RSM*RRX
460 RKQ=RKQ*RRX
500 RPY=RM+RDZ+RGZ+RGG+RDG+RSM+RKQ
510 VO=.0889*(CY+.375*SY)+.265*HY-.0333*OY:VN=.79*VO+8.000001E-03*NY
520 VR=1.866*(CY+.375*SY)/100:VH=.111*HY+.0124*WY+.0161*VO
530 VYO=VN+VR+VH:VY=VYO+1.0161*(RM-1)*VO
540 RH=(VH+.0161*(RM-1)*VO)/VY:GN=RH+VR/VY
550 AP=AFH*AY/100:UX=AP/(1-AY/100+1.306*RM*VO)
560 T=TLK:IB=0:GOSUB 5150:ILK=IB
580 T=TWK:IB=0:GOSUB 5150:IWK=IB
600 T=TRK:IB=0:GOSUB 5150:IRK=IB
620 ’QTW=(RM-RLD-RZF)*(IWK-ILK)
630 IF RLY=”YM”THEN CZ=.24
640 IF RLY=”PM”THEN CZ=.22
680 IF WY>=(QDY/150)THEN QR=(WY/100+CZ*(100-WY))*TLK
710 QP=QDY+QR
720 IF (DGQ/DE)<=.5 THEN K4=1.5*K4
730 U=UPY:R=RPY:IO=0:GOSUB 5000:IPY=II
740 K2=(IPY-RPY*ILK)*(1-K4/100)/QP*100
750 IF (DGQ/DE<=.75) THEN K5=K5*DE/DGQ
760 CCLZ=134.5:K6=(1-AFH)*CCLZ*AY/QP
770 ’IF AY<QDY/100 THEN K6=0
780 K1=100-K2-K3-K4-K5-K6-KX
只贴了前面的一部分,希望有牛人能帮帮忙
2 DIM I(20),J(20),N(20),N23(5),I1(50),J1(50),N1(50),I2(50),J2(50),N2(50)
3 DIM I3(40),J3(40),N3(40),N4(10)
4 DIM MI(20),MJ(20),MN(20),NO(3)
5 DIM A0(12),A1(12),A2(12),A3(12),A4(12),A5(12),P0(12)
6 DIM B0(12),B1(12),B2(12),B3(12),B4(12),B5(12)
7 DIM AH(12),ZQ(5,5),GB(5,3,5)
8 DIM AL(4),BL(3),CL(6),DL(4),EB(2),B(6,5),A(23),E(12)
10 DATA “YM”,20873,53.18,3.60,6.35,0.96,0.46,28.30,7.15,1350
11 DATA 1970E3, 1970E3,571,1649E3,339.2,569.0,293.6,293.6,293.6
12 DATA 28.97,28.73,27.11,26.91,26.91,26.61,26.61,26.41,26.41,25.95,25.95,25.5
13 DATA
14 DATA
15 DATA
16 DATA
17 DATA
20 DATA
21 DATA
30 DATA
240 RESTORE 10
250 READ RLY,QDY,CY,HY,OY,NY,SY,AY,WY,TX1
260 READ DE,DGQ,TGQ,DZ,TZ11,TZ22,TGS,TPS,TZPS
270 READ PGS PSM2,PBF1,PD11,PD12,PD21,PD22,PP21,PP22,PGG1,PGG2
280 READ
290 READ
300 READ
310 MM=3:KJ=4.1868:KW=1.163
320 D1=65000!:D2=55000!:DZP=0:TP1=466!:TRK=325!:UPY=121!:BJX1=0.322
321 TSM1=309.4:TSM2=352.7:TGB=436.3:XDGS=0.5536:LP=0
350 T=TGS:P=PGS:HO=0:GOSUB 6300:HGS=H
360 T=TPS:P=PGS:HO=0: GOSUB 6300:HGS=H
365 T=TZPS:P=PZ11+1:HO=0:GOSUB 6300:HZPS=H
370 T=TGQ:P=PGG2:HO=0:GOSUB 6300:HGQ=H
380 T=TZ11:P=PZ11:HO=0:GOSUB 6300:HZ1=H
390 T=TZ22:P=PGZ2:HO=0:GOSUB 6300:HZ2=H
400 QKA=(DGQ-D1-D2)*(HGQ-HGS)+(D1+D2)*(HGQ-HPS)+DZ*(HZ2-HZ1)+DZP*(HZ2-HZPS)
410 QKA=QKA/4.1868:QDY/4.1868
420 IF(DGQ/DE)>.75 GOTO 500
430 ’RM=RM+(.75-DGQ/DE)
440 RLD=RLD*DE/DGQ:RRX=(DE/DGQ)^.5
450 RDZ=RDZ*RRX:RGZ=RGZ*RRX:RRX:RGG=RGG*RRX:RDG=RDG*RRX:RSM=RSM*RRX
460 RKQ=RKQ*RRX
500 RPY=RM+RDZ+RGZ+RGG+RDG+RSM+RKQ
510 VO=.0889*(CY+.375*SY)+.265*HY-.0333*OY:VN=.79*VO+8.000001E-03*NY
520 VR=1.866*(CY+.375*SY)/100:VH=.111*HY+.0124*WY+.0161*VO
530 VYO=VN+VR+VH:VY=VYO+1.0161*(RM-1)*VO
540 RH=(VH+.0161*(RM-1)*VO)/VY:GN=RH+VR/VY
550 AP=AFH*AY/100:UX=AP/(1-AY/100+1.306*RM*VO)
560 T=TLK:IB=0:GOSUB 5150:ILK=IB
580 T=TWK:IB=0:GOSUB 5150:IWK=IB
600 T=TRK:IB=0:GOSUB 5150:IRK=IB
620 ’QTW=(RM-RLD-RZF)*(IWK-ILK)
630 IF RLY=”YM”THEN CZ=.24
640 IF RLY=”PM”THEN CZ=.22
680 IF WY>=(QDY/150)THEN QR=(WY/100+CZ*(100-WY))*TLK
710 QP=QDY+QR
720 IF (DGQ/DE)<=.5 THEN K4=1.5*K4
730 U=UPY:R=RPY:IO=0:GOSUB 5000:IPY=II
740 K2=(IPY-RPY*ILK)*(1-K4/100)/QP*100
750 IF (DGQ/DE<=.75) THEN K5=K5*DE/DGQ
760 CCLZ=134.5:K6=(1-AFH)*CCLZ*AY/QP
770 ’IF AY<QDY/100 THEN K6=0
780 K1=100-K2-K3-K4-K5-K6-KX
只贴了前面的一部分,希望有牛人能帮帮忙