请教条件过滤
请教先生,当 IF (hb(k) = hb(l)) or (MOD((3 - bjh - jjh) ,17) <> 0) or (mod((5 - bjeh - jjeh),17) <> 0) 这三者出现一个及以上时则跳过,否则记录到《运行记录表》中,但总是没成功,请指点
代码如下并发上附件压缩包,谢谢
请教过滤条件.rar
(2.77 KB)
CLEAR
CLOSE all
SET SAFETY OFF
set talk off
*-------------------------------------
DIMENSION hb(580)
USE 表1
COUN TO jl1
DIMENSION b1(jl1)
DIMENSION b1j(jl1)
select * from 表1 into array b1
*-------------------------------------
USE 表2
COUN TO jl2
DIMENSION b2(jl2)
DIMENSION b2j(jl2)
select * from 表2 into array b2
USE 运行记录表
PACK
ZAP
*------------------------------------- 表1所加之数
FOR r=1 TO 613
bjh = 0
bjeh = 0
For m = 1 To 256
If b1(m) > 128 Then
b1j(m) = b1(m) +r
Else
b1j(m) = b1(m)
EndIf
bjh = bjh + b1j(m)
bjeh = bjeh + b1j(m) * b1j(m)
ENDFOR
*------------------------------------- 表2所加之数
For i = 1 To 545
jjh = 0
jjeh = 0
For n = 1 To 324
b2j(n) = b2(n) +i
jjh = jjh + b2j(n)
jjeh = jjeh + b2j(n) * b2j(n)
ENDFOR
*ENDFOR
*-------------------------------------
For i1 = 1 To 256
hb(i1) = b1j(i1)
ENDFOR
*-------------------------------------
For i2 = 1 To 324
hb(i2 + 256) = b2j(i2)
ENDFOR
*-------------------------------------
For k = 1 To 579
For l = k + 1 To 580
IF (hb(k) = hb(l)) or (MOD((3 - bjh - jjh) ,17) <> 0) or (mod((5 - bjeh - jjeh),17) <> 0)
exit
ELSE
APPEND BLANK
REPLACE 表1所加 WITH r
REPLACE 表2所加 WITH i
*loop
ENDIF
ENDFOR
ENDFOR
*-------------------------------------
ENDFOR
ENDFOR
?' 本次运行结束'
CLOSE ALL
USE 运行记录表
DELETE FILE *.BAK
BROWSE