回复 10楼 tlliqi
谢谢
程序代码:
SET DEFAULT TO "C:\Users\Administrator\Desktop\" SET TALK OFF SELECT 2 USE pfk SELECT 1 USE ty GO TOP DO whil NOT EOF() mcj1=cj1 mxb=xb SELECT 2 LOCATE FOR mcj1>=t1a AND mcj1<=t1b AND mxb=xb IF NOT EOF() mfs1=fs ELSE mfs1=0 ENDIF SELECT 1 REPLACE fs1 WITH mfs1 SKIP ENDDO SELECT 1 GO TOP DO whil NOT EOF() mcj2=cj2 mxb=xb SELECT 2 LOCATE FOR mcj2>=t2a AND mcj2<=t2b AND mxb=xb IF NOT EOF() mfs2=fs ELSE mfs2=0 ENDIF SELECT 1 REPLACE fs2 WITH mfs2 SKIP ENDDO SELECT 1 GO TOP DO whil NOT EOF() mcj3=cj3 mxb=xb SELECT 2 LOCATE FOR mcj3>=t3a AND mcj3<=t3b AND mxb=xb IF NOT EOF() mfs3=fs ELSE mfs3=0 ENDIF SELECT 1 REPLACE fs3 WITH mfs3 SKIP ENDDO SELECT 1 GO TOP DO whil NOT EOF() mcj4=cj4 mxb=xb SELECT 2 LOCATE FOR mcj4>=t4a AND mcj4<=t2b AND mxb=xb IF NOT EOF() mfs4=fs ELSE mfs4=0 ENDIF SELECT 1 REPLACE fs4 WITH mfs4 SKIP ENDDO SELECT 1 GO TOP DO whil NOT EOF() mcj5=cj5 mxb=xb SELECT 2 LOCATE FOR mcj5>=t5a AND mcj5<=t5b AND mxb=xb IF NOT EOF() mfs5=fs ELSE mfs5=0 ENDIF SELECT 1 REPLACE fs5 WITH mfs5 SKIP ENDDO REPLACE zf WITH fs1+fs2+fs3+fs4+fs5 ALL程序通过运行,应该可以达到你的要求,有些地方可以作小的修改!