回复 19楼 fdqzy
看不明要看具体情况,最好有个示例代码
FUNCTION fun() kdx = OCCURS("_", _1D + _2D + _3D) kjo1t = OCCURS("_", _1SYJO1T + _2SYJO1T + _3SYJO1T) kjotf = OCCURS("_", _1SYJOTF + _2SYJOTF + _3SYJOTF) ksst = OCCURS("_", _1SST + _2SST + _3SST) kx5 = OCCURS("_", _1X5 + _2X5 + _3X5) ksj = OCCURS("_", _1SJ + _2SJ + _3SJ) ksyt = OCCURS("_", _1SYT + _2SYT + _3SYT) ksd = OCCURS("_", _1SD + _2SD + _3SD) ksq = OCCURS("_", _1SQ + _2SQ + _3SQ) ksty = OCCURS("_", _1STY + _2STY + _3STY) kstw = OCCURS("_", _1STW + _2STW + _3STW) ksz = OCCURS("_", _1SZ + _2SZ + _3SZ) ksyf = OCCURS("_", _1SYF + _2SYF + _3SYF) ksys = OCCURS("_", _1SYS + _2SYS + _3SYS) kp0 = OCCURS("_", _1P0 + _2P0 + _3P0) kp1_5 = OCCURS("_", _1P1_5 + _2P1_5 + _3P1_5) kp6 = OCCURS("_", _1P6 + _2P6 + _3P6) RETURN kdx ENDFUNC FUNCTION fun1() kdxtj = IIF('_'$t1._1d and '_'$t2._1d, 1, 0) kdxtj = kdxtj + IIF('_'$t1._2d and '_'$t2._2d, 1, 0) kdxtj = kdxtj + IIF('_'$t1._3d and '_'$t2._3d, 1, 0) kjo1ttj = IIF('_'$t1._1syjo1t and '_'$t2._1syjo1t, 1, 0) kjo1ttj = kjo1ttj + IIF('_'$t1._2syjo1t and '_'$t2._2syjo1t, 1, 0) kjo1ttj = kjo1ttj + IIF('_'$t1._3syjo1t and '_'$t2._3syjo1t, 1, 0) kjotftj = IIF('_'$t1._1syjotf and '_'$t2._1syjotf, 1, 0) kjotftj = kjotftj + IIF('_'$t1._2syjotf and '_'$t2._2syjotf, 1, 0) kjotftj = kjotftj + IIF('_'$t1._3syjotf and '_'$t2._3syjotf, 1, 0) kssttj = IIF('_'$t1._1sst and '_'$t2._1sst, 1, 0) kssttj = kssttj + IIF('_'$t1._2sst and '_'$t2._2sst, 1, 0) kssttj = kssttj + IIF('_'$t1._3sst and '_'$t2._3sst, 1, 0) kdxtj = IIF('_'$t1._1syt and '_'$t2._1syt, 1, 0) kdxtj = kdxtj + IIF('_'$t1._2syt and '_'$t2._2syt, 1, 0) kdxtj = kdxtj + IIF('_'$t1._3syt and '_'$t2._3syt, 1, 0) kx5tj = IIF('_'$t1._1x5 and '_'$t2._1x5, 1, 0) kx5tj = kx5tj + IIF('_'$t1._2x5 and '_'$t2._2x5, 1, 0) kx5tj = kx5tj + IIF('_'$t1._3x5 and '_'$t2._3x5, 1, 0) ksjtj = IIF('_'$t1._1sj and '_'$t2._1sj, 1, 0) ksjtj = ksjtj + IIF('_'$t1._2sj and '_'$t2._2sj, 1, 0) ksjtj = ksjtj + IIF('_'$t1._3sj and '_'$t2._3sj, 1, 0) ksyttj = IIF('_'$t1._1syt and '_'$t2._1syt, 1, 0) ksyttj = ksyttj + IIF('_'$t1._2syt and '_'$t2._2syt, 1, 0) ksyttj = ksyttj + IIF('_'$t1._3syt and '_'$t2._3syt, 1, 0) ksdtj = IIF('_'$t1._1sd and '_'$t2._1sd, 1, 0) ksdtj = ksdtj + IIF('_'$t1._2sd and '_'$t2._2sd, 1, 0) ksdtj = ksdtj + IIF('_'$t1._3sd and '_'$t2._3sd, 1, 0) ksqtj = IIF('_'$t1._1sq and '_'$t2._1sq, 1, 0) ksqtj = ksqtj + IIF('_'$t1._2sq and '_'$t2._2sq, 1, 0) ksqtj = ksqtj + IIF('_'$t1._3sq and '_'$t2._3sq, 1, 0) kstytj = IIF('_'$t1._1sty and '_'$t2._1sty, 1, 0) kstytj = kstytj + IIF('_'$t1._2sty and '_'$t2._2sty, 1, 0) kstytj = kstytj + IIF('_'$t1._3sty and '_'$t2._3sty, 1, 0) kstwtj = IIF('_'$t1._1stw and '_'$t2._1stw, 1, 0) kstwtj = kstwtj + IIF('_'$t1._2stw and '_'$t2._2stw, 1, 0) kstwtj = kstwtj + IIF('_'$t1._3stw and '_'$t2._3stw, 1, 0) ksztj = IIF('_'$t1._1sz and '_'$t2._1sz, 1, 0) ksztj = ksztj + IIF('_'$t1._2sz and '_'$t2._2sz, 1, 0) ksztj = ksztj + IIF('_'$t1._3sz and '_'$t2._3sz, 1, 0) ksyftj = IIF('_'$t1._1syf and '_'$t2._1syf, 1, 0) ksyftj = ksyftj + IIF('_'$t1._2syf and '_'$t2._2syf, 1, 0) ksyftj = ksyftj + IIF('_'$t1._3syf and '_'$t2._3syf, 1, 0) ksystj = IIF('_'$t1._1sys and '_'$t2._1sys, 1, 0) ksystj = ksystj + IIF('_'$t1._2sys and '_'$t2._2sys, 1, 0) ksystj = ksystj + IIF('_'$t1._3sys and '_'$t2._3sys, 1, 0) kp0tj = IIF('_'$t1._1p0 and '_'$t2._1p0, 1, 0) kp0tj = kp0tj + IIF('_'$t1._2p0 and '_'$t2._2p0, 1, 0) kp0tj = kp0tj + IIF('_'$t1._3p0 and '_'$t2._3p0, 1, 0) kp1_5tj = IIF('_'$t1._1p1_5 and '_'$t2._1p1_5, 1, 0) kp1_5tj = kp1_5tj + IIF('_'$t1._2p1_5 and '_'$t2._2p1_5, 1, 0) kp1_5tj = kp1_5tj + IIF('_'$t1._3p1_5 and '_'$t2._3p1_5, 1, 0) kp6tj = IIF('_'$t1._1p6 and '_'$t2._1p6, 1, 0) kp6tj = kp6tj + IIF('_'$t1._2p6 and '_'$t2._2p6, 1, 0) kp6tj = kp6tj + IIF('_'$t1._3p6 and '_'$t2._3p6, 1, 0) RETURN kdxtj ENDFUNC
SET PROCEDURE TO progs\funs.prg ADDITIVE PRIVATE kdx,kjo1t,kjotf,ksst,kx5,ksj,ksyt,ksq,ksty,kstw,ksz,ksyf,ksys,kp0,kp1_5,kp6; kdxtj,kjo1ttj,kjotftj,kssttj,kx5tj,ksjtj,ksyttj,ksqtj,kstytj,kstwtj,ksztj,ksyftj,ksystj,kp0tj,kp1_5tj,kp6tj kdx=0 kjo1t=0 kjotf=0 ksst=0 kx5=0 ksj=0 ksyt=0 ksq=0 ksty=0 kstw=0 ksz=0 ksyf=0 ksys=0 kp0=0 kp1_5=0 kp6=0 kdxtj=0 &&以下是fun1()中的参数 kjo1ttj=0 kjotftj=0 kssttj=0 kx5tj=0 ksjtj=0 ksyttj=0 ksqtj=0 kstytj=0 kstwtj=0 ksztj=0 ksyftj=0 ksystj=0 kp0tj=0 kp1_5tj=0 kp6tj=0
[此贴子已经被作者于2020-9-25 20:44编辑过]