-
vb程序分析0
刚接触vb,有一段代码需要分析一下,请各位帮忙注释一下主要代码的详解,多谢!
问题补充:Rem "暴雨洪水图集瞬时单位线计算设计洪水程序"
CLEAR
INPUT "请输入:输入、输出文件名"; SRM$, SCM$
OPEN SRM$ FOR INPUT AS #1
INPUT #1, XX
DIM H1(XX), H3(XX), H6(XX), H24(XX), PO(XX), HH(24), MP(25), TC(XX), PTC(XX), H(XX, 24)
DIM R(XX), HI(XX, 24), FF(XX), I(XX), N(XX), K(XX), UH(40), S2(40), Q(XX, 100), MM(XX)
DIM NN(XX), U(XX, 40)
INPUT #1, F, J, L
FOR I = 1 TO XX: INPUT #1, PO(I), H1(I), H3(I), H6(I), H24(I): NEXT I
GOSUB 2000: CLS
GOSUB 3500: CLS : LOCATE 10, 10: PRINT "正在运行"
GOSUB 4500: CLS
C = F / 3.6
FOR I = 1 TO XX: FOR JJ = 0 TO (MM(I) + NN(I) - 1): Q(I, JJ) = 0: NEXT JJ: NEXT I
FOR I = 1 TO XX: FOR II = 1 TO MM(I): FOR JJ = 0 TO NN(I)
Q(I, II + JJ - 1) = Q(I, II + JJ - 1) + HI(I, II) * U(I, JJ) * C
NEXT JJ: NEXT II: NEXT I
REM "成果输出"
OPEN SCM$ FOR OUTPUT AS #2
PRINT #2, TAB(15); "***暴雨洪水图集瞬时单位线计算设计洪水成果***"
PRINT #2, " "
PRINT #2, TAB(20); "河名 流域": GOSUB 1900
PRINT #2, TAB(16); "F="; F; TAB(24); "km^2"; TAB(36); "J="; J;
PRINT #2, TAB(45); "0/00"; TAB(56); "L="; L; TAB(65); "km": GOSUB 1900
PRINT #2, TAB(8); "P(%)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; PO(I); "%"; : NEXT I: PRINT #2, : GOSUB 1900
PRINT #2, TAB(8); "面 H1 (mm)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; H1(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "暴 H3 (mm)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; H3(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "雨 H6 (mm)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; H6(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "量 H24 (mm)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; H24(I); : NEXT I: PRINT #2,
GOSUB 1900: PRINT #2, TAB(8); "面暴雨过程"; : FOR JJ = 1 TO 24: PRINT #2, TAB(24); JJ;
FOR I = 1 TO XX: PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; H(I, JJ);
NEXT I: PRINT #2, : NEXT JJ: GOSUB 1900
PRINT #2, TAB(8); "下渗率f (mm/hr)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; FF(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "净雨量h (mm)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; R(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "产流历时tc (hr)"; : FOR I = 1 TO XX
PRINT #2, TAB(31 + (I - 1) * ; TC(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "净雨强i (mm/hr)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; I(I); : NEXT I: PRINT #2, : GOSUB 1900
MJ = 0: FOR I = 1 TO XX: IF MM(I) > MJ THEN MJ = MM(I)
NEXT I
PRINT #2, TAB(8); "净雨过程"; : FOR JJ = 1 TO MJ: PRINT #2, TAB(24); JJ;
FOR I = 1 TO XX: PRINT #2, TAB(30 + (I - 1) * ; USING "###.#"; HI(I, JJ); : NEXT I
PRINT #2, : NEXT JJ: GOSUB 1900
FOR KK = 1 TO 15: PRINT #2, : NEXT KK
PRINT #2, TAB(30); "河名: 流域:": GOSUB 1900
PRINT #2, TAB(8); "P(%)"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; PO(I); "%"; : NEXT I: PRINT #2, : GOSUB 1900
PRINT #2, TAB(8); "n"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "#.#"; N(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "k"; : FOR I = 1 TO XX
PRINT #2, TAB(30 + (I - 1) * ; USING "#.###"; K(I); : NEXT I: PRINT #2,
PRINT #2, TAB(8); "时段单位线"; : FOR JJ = 0 TO NN(XX): PRINT #2, TAB(24); JJ;
FOR I = 1 TO XX: PRINT #2, TAB(30 + (I - 1) * ; USING "#.###"; U(I, JJ); : NEXT I
PRINT #2, : NEXT JJ: GOSUB 1900
PRINT #2, TAB(25); "*****直接径流过程*****": GOSUB 1900
MA = 0: FOR I = 1 TO XX: IF (MM(I) + NN(I) - 1) > MA THEN MA = MM(I) + NN(I) - 1
NEXT I
PRINT #2, TAB(8); "时段(hr)"; : FOR I = 1 TO XX
PRINT #2, TAB(20 + (I - 1) * 10); PO(I); "%"; : NEXT I: PRINT #2, : GOSUB 1900
FOR JJ = 0 TO MA: PRINT #2, TAB(10); JJ; : FOR I = 1 TO XX
PRINT #2, TAB(20 + (I - 1) * 10); USING "####.#"; Q(I, JJ); : NEXT I: PRINT #2, : NEXT JJ
CLOSE #1, #2: END
PRINT #2, TAB(8); "--------------------------------------------------------";
PRINT #2, TAB(64); "-------------": RETURN
REM "暴雨过程计算子程序"
CLS
LOCATE 5, 10: PRINT "1 河西区"
LOCATE 7, 10: PRINT "2 黄河干支流区"
LOCATE 9, 10: PRINT "3 渭河区"
LOCATE 11, 10: PRINT "4 泾河区"
LOCATE 13, 10: PRINT "5 嘉陵江区"
LOCATE 16, 10: PRINT "请输入暴雨分区代号": LOCATE 16, 30: INPUT HQY
IF HQY = 1 THEN 2200
IF HQY = 2 THEN 2400
IF HQY = 3 THEN 2600
IF HQY = 4 THEN 2800
IF HQY = 5 THEN 3000
GOTO 2005
IF F < 100 THEN 2300
IF (F >= 100 AND F <= 300) THEN 2350
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .01 * H18: H(I, 2) = .02 * H18: H(I, 3) = .02 * H18
H(I, 4) = .03 * H18: H(I, 5) = .03 * H18: H(I, 6) = .04 * H18: H(I, 7) = .12 * H18: H(I, = .19 * H18
H(I, 9) = .18 * H6(I): H(I, 10) = .28 * H6(I): H(I, 11) = .16 * H6(I): H(I, 12) = .14 * H6(I)
H(I, 13) = .13 * H6(I): H(I, 14) = .11 * H6(I)
H(I, 15) = .18 * H18: H(I, 16) = .18 * H18: H(I, 17) = 9.000001E-02 * H18: H(I, 18) = .05 * H18
H(I, 19) = .02 * H18: H(I, 20) = .02 * H18: H(I, 21) = 0: H(I, 22) = 0: H(I, 23) = 0: H(I, 24) = 0
GOSUB 3200: JH6 = 0: JH24 = 0
FOR JJ = 9 TO 14: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 10) = H(I, 10) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, = H(I, - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .01 * H18: H(I, 2) = .01 * H18: H(I, 3) = .02 * H18
H(I, 4) = .03 * H18: H(I, 5) = .03 * H18: H(I, 6) = .03 * H18: H(I, 7) = .03 * H18: H(I, = .32 * H18
H(I, 9) = .46 * (H6(I) - H3(I)): H(I, 10) = H1(I): H(I, 11) = .6 * (H3(I) - H1(I))
H(I, 12) = .4 * (H3(I) - H1(I)): H(I, 13) = .4 * (H6(I) - H3(I)): H(I, 14) = .14 * (H6(I) - H3(I))
H(I, 15) = .29 * H18: H(I, 16) = .05 * H18: H(I, 17) = .07 * H18: H(I, 18) = .05 * H18
H(I, 19) = .03 * H18: H(I, 20) = .02 * H18: H(I, 21) = .01 * H18: H(I, 22) = 0: H(I, 23) = 0
H(I, 24) = 0
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 10 TO 12: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 11) = H(I, 11) - DH3
FOR JJ = 9 TO 14: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 9) = H(I, 9) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, = H(I, - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .01 * H18: H(I, 2) = .01 * H18: H(I, 3) = .02 * H18
H(I, 4) = .03 * H18: H(I, 5) = .04 * H18: H(I, 6) = .07 * H18: H(I, 7) = .11 * H18: H(I, = .25 * H18
H(I, 9) = .34 * H3(I): H(I, 10) = .42 * H3(I): H(I, 11) = .24 * H3(I)
H(I, 12) = .35 * (H6(I) - H3(I)): H(I, 13) = .37 * (H6(I) - H3(I))
H(I, 14) = .28 * (H6(I) - H3(I)): H(I, 15) = .26 * H18: H(I, 16) = .03 * H18: H(I, 17) = .03 * H18
H(I, 18) = .07 * H18: H(I, 19) = .03 * H18: H(I, 20) = .02 * H18
H(I, 21) = .02 * H18: H(I, 22) = 0: H(I, 23) = 0: H(I, 24) = 0
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 9 TO 11: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 10) = H(I, 10) - DH3
FOR JJ = 9 TO 14: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 13) = H(I, 13) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 15) = H(I, 15) - DH24
NEXT I: RETURN
IF F < 100 THEN 2500
IF (F >= 100 AND F <= 300) THEN 2550
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .03 * H18: H(I, 2) = 9.000001E-02 * H18: H(I, 3) = .1 * H18
H(I, 4) = .03 * H18: H(I, 5) = .01 * H18: H(I, 6) = .11 * H18: H(I, 7) = .18 * H18
H(I, = .128 * H6(I): H(I, 9) = .27 * H6(I): H(I, 10) = .2 * H6(I): H(I, 11) = .18 * H6(I)
H(I, 12) = .112 * H6(I): H(I, 13) = .11 * H6(I): H(I, 14) = .23 * H18
H(I, 15) = .08 * H18: H(I, 16) = .04 * H18: H(I, 17) = .03 * H18: H(I, 18) = .02 * H18
H(I, 19) = .02 * H18: H(I, 20) = .01 * H18: H(I, 21) = .01 * H18: H(I, 22) = .01 * H18
H(I, 23) = 0: H(I, 24) = 0
GOSUB 3200: JH6 = 0: JH24 = 0
FOR JJ = 8 TO 13: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 9) = H(I, 9) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 14) = H(I, 14) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = 0: H(I, 2) = 0: H(I, 3) = 0: H(I, 4) = 0: H(I, 5) = 0
H(I, 6) = .11 * H18: H(I, 7) = .12 * (H6(I) - H3(I)): H(I, = .15 * (H6(I) - H3(I))
H(I, 9) = .73 * (H6(I) - H3(I)): H(I, 10) = H1(I): H(I, 11) = .68 * (H3(I) - H1(I))
H(I, 12) = .32 * (H3(I) - H1(I)): H(I, 13) = .3 * H18: H(I, 14) = .24 * H18
H(I, 15) = .1 * H18: H(I, 16) = .16 * H18: H(I, 17) = 9.000001E-02 * H18: H(I, 18) = 0
H(I, 19) = 0: H(I, 20) = 0: H(I, 21) = 0: H(I, 22) = 0: H(I, 23) = 0
H(I, 24) = 0
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 10 TO 12: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 11) = H(I, 11) - DH3
FOR JJ = 7 TO 12: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 9) = H(I, 9) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 13) = H(I, 13) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .08 * H18: H(I, 2) = .08 * H18: H(I, 3) = .02 * H18
H(I, 4) = 0: H(I, 5) = .01 * H18: H(I, 6) = .04 * H18: H(I, 7) = .05 * (H6(I) - H3(I))
H(I, = .25 * (H6(I) - H3(I)): H(I, 9) = .407 * H3(I): H(I, 10) = .401 * H3(I)
H(I, 11) = .192 * H3(I): H(I, 12) = .7 * (H6(I) - H3(I)): H(I, 13) = .37 * H18
H(I, 14) = .27 * H18: H(I, 15) = .06 * H18: H(I, 16) = .02 * H18: H(I, 17) = .01 * H18
H(I, 18) = .01 * H18: H(I, 19) = .01 * H18: H(I, 20) = .01 * H18
H(I, 21) = .01 * H18: H(I, 22) = 0: H(I, 23) = 0: H(I, 24) = 0
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 9 TO 11: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 9) = H(I, 9) - DH3
FOR JJ = 7 TO 12: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 12) = H(I, 12) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 13) = H(I, 13) - DH24
NEXT I: RETURN
IF F < 100 THEN 2700
IF (F >= 100 AND F <= 300) THEN 2750
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = 0: H(I, 2) = 0: H(I, 3) = .02 * H18
H(I, 4) = .03 * H18: H(I, 5) = .05 * H18: H(I, 6) = .06 * H18: H(I, 7) = .07 * H18
H(I, = 9.000001E-02 * H18: H(I, 9) = .11 * H18: H(I, 10) = .15 * H18: H(I, 11) = .231 * H6(I)
H(I, 12) = .239 * H6(I): H(I, 13) = .145 * H6(I): H(I, 14) = .123 * H6(I)
H(I, 15) = .192 * H6(I): H(I, 16) = .07 * H6(I): H(I, 17) = .2 * H18: H(I, 18) = .1 * H18
H(I, 19) = .05 * H18: H(I, 20) = .03 * H18: H(I, 21) = .02 * H18: H(I, 22) = .01 * H18
H(I, 23) = .01 * H18: H(I, 24) = 0
GOSUB 3200: JH6 = 0: JH24 = 0
FOR JJ = 11 TO 16: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 12) = H(I, 12) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 17) = H(I, 17) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = 0: H(I, 2) = 0: H(I, 3) = .01 * H18: H(I, 4) = 0: H(I, 5) = .01 * H18
H(I, 6) = 0: H(I, 7) = .01 * H18: H(I, = .03 * H18: H(I, 9) = .06 * H18: H(I, 10) = .07 * H18
H(I, 11) = .35 * (H6(I) - H3(I)): H(I, 12) = H1(I): H(I, 13) = .64 * (H3(I) - H1(I))
H(I, 14) = .36 * (H3(I) - H1(I)): H(I, 15) = .38 * (H6(I) - H3(I))
H(I, 16) = .27 * (H6(I) - H3(I)): H(I, 17) = .25 * H18: H(I, 18) = .18 * H18: H(I, 19) = .05 * H18
H(I, 20) = 9.000001E-02 * H18: H(I, 21) = .08 * H18: H(I, 22) = .06 * H18: H(I, 23) = .06 * H18
H(I, 24) = .04 * H18
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 12 TO 14: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 13) = H(I, 13) - DH3
FOR JJ = 11 TO 16: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 15) = H(I, 15) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 17) = H(I, 17) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = 0: H(I, 2) = 0: H(I, 3) = .01 * H18
H(I, 4) = .02 * H18: H(I, 5) = .03 * H18: H(I, 6) = .03 * H18: H(I, 7) = .04 * H18
H(I, = .08 * H18: H(I, 9) = .1 * H18: H(I, 10) = .1 * (H6(I) - H3(I))
H(I, 11) = .509 * H3(I): H(I, 12) = .337 * H3(I): H(I, 13) = .154 * H3(I)
H(I, 14) = .55 * (H6(I) - H3(I)): H(I, 15) = .35 * (H6(I) - H3(I)): H(I, 16) = .25 * H18
H(I, 17) = .15 * H18: H(I, 18) = .12 * H18: H(I, 19) = .05 * H18: H(I, 20) = .05 * H18
H(I, 21) = .03 * H18: H(I, 22) = .02 * H18: H(I, 23) = .01 * H18: H(I, 24) = .01 * H18
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 11 TO 13: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 11) = H(I, 11) - DH3
FOR JJ = 10 TO 15: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 14) = H(I, 14) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 16) = H(I, 16) - DH24
NEXT I: RETURN
IF F < 100 THEN 2900
IF F >= 100 AND F <= 300 THEN 2950
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .02 * H18: H(I, 2) = .04 * H18: H(I, 3) = .06 * H18
H(I, 4) = .07 * H18: H(I, 5) = .1 * H18: H(I, 6) = .3 * H6(I): H(I, 7) = .15 * H6(I)
H(I, = .13 * H6(I): H(I, 9) = .136 * H6(I): H(I, 10) = .144 * H6(I): H(I, 11) = .14 * H6(I)
H(I, 12) = .18 * H18: H(I, 13) = .11 * H18: H(I, 14) = .09 * H18
H(I, 15) = .08 * H18: H(I, 16) = .05 * H18: H(I, 17) = .04 * H18: H(I, 18) = .04 * H18
H(I, 19) = .03 * H18: H(I, 20) = .03 * H18: H(I, 21) = .02 * H18: H(I, 22) = .02 * H18
H(I, 23) = .01 * H18: H(I, 24) = .01 * H18
GOSUB 3200: JH6 = 0: JH24 = 0
FOR JJ = 6 TO 11: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 6) = H(I, 6) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 12) = H(I, 12) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = 0: H(I, 2) = 0: H(I, 3) = 0: H(I, 4) = 0: H(I, 5) = 0
H(I, 6) = .12 * H18: H(I, 7) = .12 * H18: H(I, = .12 * H18: H(I, 9) = .24 * (H6(I) - H3(I))
H(I, 10) = .38 * (H3(I) - H1(I)): H(I, 11) = H1(I): H(I, 12) = .62 * (H3(I) - H1(I))
H(I, 13) = .4 * (H6(I) - H3(I)): H(I, 14) = .36 * (H6(I) - H3(I)): H(I, 15) = .24 * H18
H(I, 16) = .2 * H18: H(I, 17) = .2 * H18: H(I, 18) = 0: H(I, 19) = 0
H(I, 20) = 0: H(I, 21) = 0: H(I, 22) = 0: H(I, 23) = 0: H(I, 24) = 0
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 10 TO 12: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 12) = H(I, 12) - DH3
FOR JJ = 9 TO 14: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 13) = H(I, 13) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 15) = H(I, 15) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = 0: H(I, 2) = .02 * H18: H(I, 3) = .03 * H18
H(I, 4) = .04 * H18: H(I, 5) = .04 * H18: H(I, 6) = .06 * H18: H(I, 7) = .1 * H18
H(I, = .22 * H18: H(I, 9) = .45 * H3(I): H(I, 10) = .3 * H3(I)
H(I, 11) = .25 * H3(I): H(I, 12) = .44 * (H6(I) - H3(I)): H(I, 13) = .44 * (H6(I) - H3(I))
H(I, 14) = .12 * (H6(I) - H3(I)): H(I, 15) = .12 * H18: H(I, 16) = .11 * H18
H(I, 17) = .06 * H18: H(I, 18) = .06 * H18: H(I, 19) = .05 * H18: H(I, 20) = .04 * H18
H(I, 21) = .03 * H18: H(I, 22) = .02 * H18: H(I, 23) = 0: H(I, 24) = 0
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 9 TO 11: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 9) = H(I, 9) - DH3
FOR JJ = 9 TO 14: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 12) = H(I, 12) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, = H(I, - DH24
NEXT I: RETURN
IF F < 100 THEN 3100
IF F >= 100 AND F <= 300 THEN 3150
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .01 * H18: H(I, 2) = .02 * H18: H(I, 3) = .03 * H18
H(I, 4) = .04 * H18: H(I, 5) = .05 * H18: H(I, 6) = .05 * H18: H(I, 7) = .06 * H18
H(I, = .12 * H6(I): H(I, 9) = .19 * H6(I): H(I, 10) = .22 * H6(I): H(I, 11) = .18 * H6(I)
H(I, 12) = .17 * H6(I): H(I, 13) = .12 * H6(I): H(I, 14) = .28 * H18
H(I, 15) = .09 * H18: H(I, 16) = .07 * H18: H(I, 17) = .07 * H18: H(I, 18) = .05 * H18
H(I, 19) = .05 * H18: H(I, 20) = .05 * H18: H(I, 21) = .03 * H18: H(I, 22) = .02 * H18
H(I, 23) = .02 * H18: H(I, 24) = .01 * H18
GOSUB 3200: JH6 = 0: JH24 = 0
FOR JJ = 8 TO 13: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 10) = H(I, 10) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 14) = H(I, 14) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .01 * H18: H(I, 2) = .01 * H18: H(I, 3) = .01 * H18
H(I, 4) = .03 * H18: H(I, 5) = .03 * H18: H(I, 6) = .04 * H18: H(I, 7) = .08 * H18
H(I, = .22 * (H6(I) - H3(I)): H(I, 9) = .48 * (H6(I) - H3(I)): H(I, 10) = H1(I)
H(I, 11) = .56 * (H3(I) - H1(I)): H(I, 12) = .44 * (H3(I) - H1(I))
H(I, 13) = .3 * (H6(I) - H3(I)): H(I, 14) = .14 * H18: H(I, 15) = .14 * H18
H(I, 16) = .14 * H18: H(I, 17) = .12 * H18: H(I, 18) = .07 * H18: H(I, 19) = .04 * H18
H(I, 20) = .04 * H18: H(I, 21) = .03 * H18: H(I, 22) = .03 * H18: H(I, 23) = .02 * H18: H(I, 24) = .02 * H18
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 10 TO 12: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 11) = H(I, 11) - DH3
FOR JJ = 8 TO 13: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, 9) = H(I, 9) - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 14) = H(I, 14) - DH24
NEXT I: RETURN
FOR I = 1 TO XX
H18 = H24(I) - H6(I): H(I, 1) = .01 * H18: H(I, 2) = .02 * H18: H(I, 3) = .02 * H18
H(I, 4) = .03 * H18: H(I, 5) = .03 * H18: H(I, 6) = .08 * H18: H(I, 7) = .12 * H18
H(I, = .4 * (H6(I) - H3(I)): H(I, 9) = .4 * H3(I): H(I, 10) = .3 * H3(I)
H(I, 11) = .3 * H3(I): H(I, 12) = .38 * (H6(I) - H3(I)): H(I, 13) = .22 * (H6(I) - H3(I))
H(I, 14) = .12 * H18: H(I, 15) = .11 * H18: H(I, 16) = .11 * H18
H(I, 17) = .1 * H18: H(I, 18) = .06 * H18: H(I, 19) = .05 * H18: H(I, 20) = .05 * H18
H(I, 21) = .03 * H18: H(I, 22) = .03 * H18: H(I, 23) = .02 * H18: H(I, 24) = .01 * H18
GOSUB 3200: JH3 = 0: JH6 = 0: JH24 = 0
FOR JJ = 9 TO 11: JH3 = JH3 + H(I, JJ): NEXT JJ
IF JH3 <> H3(I) THEN DH3 = JH3 - H3(I): H(I, 9) = H(I, 9) - DH3
FOR JJ = 8 TO 13: JH6 = JH6 + H(I, JJ): NEXT JJ
IF JH6 <> H6(I) THEN DH6 = JH6 - H6(I): H(I, = H(I, - DH6
FOR JJ = 1 TO 24: JH24 = JH24 + H(I, JJ): NEXT JJ
IF JH24 <> H24(I) THEN DH24 = JH24 - H24(I): H(I, 7) = H(I, 7) - DH24
NEXT I: RETURN
FOR JM = 1 TO 24
H(I, JM) = INT(H(I, JM) * 10 + .5) / 10: NEXT JM
RETURN
REM "产汇流计算子程序"
LOCATE 2, 15: PRINT "*******产流分区*******"
LOCATE 5, 15: PRINT "1 河西石山森林草原区"
LOCATE 7, 15: PRINT "2 陇南石山林区"
LOCATE 9, 15: PRINT "3 黄土区"
LOCATE 11, 15: PRINT "4 黄土山(林)区"
LOCATE 13, 15: PRINT "5 六盘山土石山区"
LOCATE 17, 15: INPUT "请输入分区代号:", FQY
FOR I = 1 TO XX: R(I) = 0: MM(I) = 0: PTC(I) = 0
FOR JJ = 1 TO 24: HH(JJ) = H(I, JJ): MP(JJ) = 0: NEXT JJ: MP(25) = 0
FOR II = 1 TO 24: FOR JJ = 1 TO 24
IF HH(JJ) > MP(II) THEN MP(II) = HH(JJ): PP = JJ
NEXT JJ: HH(PP) = 0: NEXT II
FOR JJ = 1 TO 24: PTC(I) = PTC(I) + MP(JJ): NEXT JJ
FOR T = 24 TO 1 STEP -1: PTC(I) = PTC(I) - MP(T + 1): TC(I) = T
IF FQY = 1 GOTO 4010
IF FQY = 2 GOTO 4020
IF FQY = 3 GOTO 4030
IF FQY = 4 GOTO 4040
IF FQY = 5 GOTO 4050
GOTO 3503
FF(I) = INT(FF(I) * 10 + .5) / 10
UTC = 0: FOR JJ = 1 TO 24: IF MP(JJ) > FF(I) THEN UTC = UTC + 1
NEXT JJ
IF UTC <> TC(I) THEN 3635
GOTO 3640
NEXT T
FOR LL = 1 TO TC(I): R(I) = R(I) + MP(LL) - FF(I): NEXT LL: I(I) = R(I) / TC(I)
FOR JJ = 1 TO 24: IF H(I, JJ) <= FF(I) THEN 3670
MM(I) = MM(I) + 1: HI(I, MM(I)) = H(I, JJ) - FF(I)
NEXT JJ: NEXT I
CLS : LOCATE 2, 15: PRINT "*******汇流分区*******"
LOCATE 5, 15: PRINT "1 河西石山森林草原区"
LOCATE 7, 15: PRINT "2 陇南石山林区"
LOCATE 9, 15: PRINT "3 黄土区"
LOCATE 11, 15: PRINT "4 黄土山(林)区"
LOCATE 13, 15: PRINT "5 六盘山土石山林区"
LOCATE 15, 15: PRINT "6 六盘山土石山植被一般区"
LOCATE 19, 15: INPUT "请输入分区代号:", LQY
FOR I = 1 TO XX
IF LQY = 1 THEN 4060
IF LQY = 2 THEN 4070
IF LQY = 3 THEN 4080
IF LQY = 4 THEN 4090
IF LQY = 5 THEN 4100
IF LQY = 6 THEN 4110
GOTO 3680
M1 = M110 * (10 / I(I)) ^ B: N(I) = 1 / M2: K(I) = M1 / N(I)
N(I) = INT(N(I) * 10 + .5) / 10: K(I) = INT(K(I) * 1000 + .5) / 1000
NEXT I: RETURN
FF(I) = 28 * TC(I) ^ (-.78) * (1 - EXP(-.023 * TC(I) ^ (-.12) * PTC(I))): GOTO 3610
FF(I) = 27.5 * TC(I) ^ (-.69) * (1 - EXP(-.06 * TC(I) ^ (-1.15) * PTC(I))): GOTO 3610
FF(I) = 33 * TC(I) ^ (-.788) * (1 - EXP(-.024 * TC(I) ^ (-.232) * PTC(I))): GOTO 3610
FF(I) = 41 * TC(I) ^ (-.75) * (1 - EXP(-.024 * TC(I) ^ (-.29) * PTC(I))): GOTO 3610
FF(I) = 37 * TC(I) ^ (-.76) * (1 - EXP(-.024 * TC(I) ^ (-.26) * PTC(I))): GOTO 3610
M110 = 1.41 * (F / J) ^ .112: B = 2.49 - 1.545 * (LOG(F / L) / LOG(10))
M2 = .858 * (F / J) ^ (-.236): GOTO 3770
M110 = .997 * F ^ .33 * J ^ (-.313): B = 1.024 - .15 * (LOG(F) / LOG(10))
M2 = 1.637 * F ^ (-.331) * J ^ .257: GOTO 3770
M110 = .94 * F ^ .16 * J ^ (-.33): B = .355 - .06 * (LOG(F) / LOG(10))
M2 = .69 * F ^ (-.19) * J ^ .3: GOTO 3770
M110 = .9 * F ^ .18 * J ^ (-.33): B = .28 - .05 * (LOG(F) / LOG(10))
M2 = .86 * F ^ (-.29) * J ^ .53: GOTO 3770
M110 = 2.59 * F ^ .22: B = .27 - .057 * (LOG(F) / LOG(10))
M2 = .49 * F ^ (-.08): GOTO 3770
M110 = 1.1 * F ^ .13: B = .27 - .057 * (LOG(F) / LOG(10))
M2 = .68 * F ^ (-.08): GOTO 3770
REM "瞬时单位线子程序"
DT = 1
DEF FNP (X) = EXP(-X) * X ^ (N - 1)
DEF FNS (Y) = EXP(-Y / K) * (Y / K) ^ (N - 1)
N = N(1)
IF N < 1 THEN N = N + 1: GOSUB 5500: T = T / (N - 1): GOTO 4555
GOSUB 5500
FOR I = 1 TO XX: K = K(I)
C = 0: D = DT: UH(0) = 0: S2(0) = 0: SUH = 0
FOR Z = 1 TO 40
GOSUB 6500
S2(Z) = SS / (K * T)
UH(Z) = S2(Z) - S2(Z - 1): UH(Z) = INT(UH(Z) * 1000 + .5) / 1000
SUH = SUH + UH(Z)
IF SUH = 1 THEN UH(Z + 1) = 0: M = Z + 1: GOTO 4645
IF SUH > 1 THEN UH(Z + 1) = 0: M = Z + 1: UH(Z) = 1 - (SUH - UH(Z)): GOTO 4645
IF UH(Z) = 0 THEN UH(Z) = 1 - SUH: UH(Z + 1) = 0: M = Z + 1: GOTO 4645
D = D + DT: NEXT Z
FOR JJ = 0 TO M: U(I, JJ) = UH(JJ): NEXT JJ: NN(I) = M: NEXT I
RETURN
REM
A = 0: B = 50: M = 1000: T = 0
S1 = 0: S2 = 0: H = (B - A) / M: X = A
FOR II = 1 TO M - 1 STEP 2
X = X + H: S1 = S1 + FNP(X)
X = X + H: S2 = S2 + FNP(X)
NEXT II
S = (FNP(A) + FNP(B) + 4 * S1 + 2 * S2) * H / 3
IF S < .0001 THEN 5700
T = T + S: A = A + 50: B = B + 50: GOTO 5520
RETURN
REM
A1 = 0: A2 = 0
IF Z <= 5 THEN JJ = 200
IF Z > 5 AND Z < 10 THEN JJ = 400
IF Z >= 10 THEN JJ = 600
H = (D - C) / JJ: Y = C
FOR LL = 1 TO JJ - 1 STEP 2
Y = Y + H: A1 = A1 + FNS(Y)
Y = Y + H: A2 = A2 + FNS(Y)
NEXT LL
SS = (FNS(C) + FNS(D) + 4 * A1 + 2 * A2) * H / 3
RETURN
2014年12月22日 12:53
目前还没有答案
相关推荐
总的来说,VB程序反编译器V1.2是一个用于VB程序分析的实用工具,它可以帮助开发者理解和修改已编译的VB应用程序,但同时也需要用户遵守相关法律和注意软件安全。在软件开发和维护的过程中,合理使用反编译器可以提高...
《VB程序设计实例100》是一份专为初学者准备的VB(Visual Basic)编程教程,涵盖了100个精心挑选的实例,旨在帮助学习者从基础开始,逐步掌握VB编程的核心技能。通过这些实例,你可以深入理解VB语言的语法、控件使用...
程序分析 该程序主要由三个部分组成:初始化、命令处理和定时器处理。 初始化 在Form_Load事件中,程序对窗体的尺寸、位置和初始参数进行了调整。同时,程序还对控件的属性进行了设置,如Command1的Caption和...
VB程序源代码提取器的工作原理可能包括反汇编、静态分析等技术。反汇编是将机器语言转换回人类可读的汇编语言,而静态分析则是在不运行程序的情况下,通过对代码的结构和数据流的分析来理解程序的功能。这些技术的...
VBRes vb资源管理器和VB反汇编程序是两款针对Visual Basic(VB)程序进行反编译和资源提取的工具,它们可以帮助开发者或逆向工程师了解和分析VB程序的内部结构。 首先,让我们详细了解一下VBRes vb资源管理器。...
- **注册表操作**:部分硬件配置信息存储在注册表中,VB程序可以读取和修改注册表来获取或调整配置。 3. **用户界面设计**: - **控件布局**:使用VB的Form设计器,可以自由摆放控件,设置它们的属性,如尺寸、...
"VB程序代码提取"工具,正如其名,是为了帮助用户方便地从VB项目文件中提取出源代码,这对于学习、分析或重构VB程序来说是非常实用的。 在VB编程中,代码通常存储在.vbp(项目文件)、.frm(窗体文件)和.bas(标准...
在论文写作方面,VB程序设计可以应用于数据分析、可视化以及实验模拟等多个领域。通过VB开发的数据处理程序可以帮助收集、整理和分析数据,为论文提供强有力的支持。同时,VB也可以用来创建交互式的演示程序,生动地...
在压缩包中的"层次分析法"文件可能是VB程序的源代码或者相关的文档,你可以通过阅读和运行这些文件来进一步了解如何在VB中实现层次分析法。这为你提供了实践和学习AHP理论与编程技术的宝贵资源。如果你是初学者,...
【VB程序——毕业设计】 VB,全称Visual Basic,是由微软公司推出的面向对象的编程语言,它是基于Basic语言的一种可视化编程工具。VB以其简洁的语法、直观的界面设计和强大的功能,深受初学者和专业开发者的喜爱。...
《VB程序设计——学生管理系统详解》 VB,全称Visual Basic,是Microsoft公司推出的一种面向对象的、基于事件驱动的编程语言,它以其易学易用的特点,深受初学者和专业开发者的喜爱。在这个“VB程序设计 学生管理...
定时器在VB程序设计中有着广泛的应用场景,例如: - **计时应用**:如秒表或倒计时器。 - **周期性任务执行**:如定时备份数据、更新数据库等。 - **游戏开发**:在游戏中控制角色的动作间隔或游戏时间。 - **用户...
VB程序的设计通常包括以下几个关键知识点: 1. **用户界面设计**:使用VB的Form控件创建图形用户界面(GUI),展示曲柄滑块机构的静态模型,用户可以通过界面输入各个部件的长度和初始角度。 2. **数据处理**:...
资源名:高级指纹分析VB程序源码 资源类型:程序源代码 源码说明: 一个很不错的指纹分析算法源代码,可以从采集的指纹图片中进行二次黑白化,平滑图像处理。可以对指纹图像特征信息提取,比对,以轮廓显示以及色彩...
**VB程序抽奖系统详解** VB,全称Visual Basic,是由微软公司推出的面向对象的编程语言,它是基于Basic语言的一种可视化编程工具。VB以其易学易用、开发效率高而受到许多初学者和专业开发者的喜爱。在这个“VB程序...
在VB程序设计中,这通常通过循环结构实现,不断发送指令以维持云台的运动状态。 2. 点动控制:点动控制,又称点到点转动,是指用户每次按下按钮,云台都会移动一个固定角度或距离,松开按钮后停止。这种模式适合于...
反编译VB程序是指将已经编译成机器码的VB程序还原为源代码的过程,这通常是为了理解程序的工作原理、修复错误或者进行逆向工程。 在IT领域,反编译是一个复杂且具有挑战性的主题,涉及到计算机语言的底层机制、二...
标题中的“手机发短信的VB程序”指的是使用Visual Basic(VB)编程语言开发的一个应用程序,该程序具有通过GSM(Global System for Mobile Communications,全球移动通信系统)技术发送和接收短信的功能。...
在软件开发和逆向工程领域,这种工具对于调试、学习、分析或修复VB程序至关重要。由于VB编译后的程序通常以二进制形式存在,无法直接阅读,反编译工具就起到了翻译的作用,将这些二进制代码转换回可读的VB源代码。 ...