我已找到解决办法,设计函数如下:
FUNCTION dwdz
PARA dwdz0,n
x=0
for i=0 to 28
x=iif(ISLEADBYTE(substr(dwdz0,i)),x+1,x)
endfor
if x%2=0
dwdz1=substr(dwdz0,1,28)
dwdz2=substr(dwdz0,29,56)
else
dwdz1=substr(dwdz0,1,27)
dwdz2=substr(dwdz0,28,56)
endif
do case
case n=1
return dwdz1
case n=2
return dwdz2
endcase