TXT数据保存到二维数组
将文件xlrecno.txt内容保存到二维数组a(8,31)中,规则:a(1,1)=11.....a(1,31)=131
a(2,1)=21.....a(2,31)=231
.
.
a(8,1)=81......a(8,31)=831
PUBLIC array aa(8),bb(8,31)
a1=Filetostr("xlrecno.txt")
ALINES(aa,a1,4,CHR(13),CHR(10))
FOR i=1 TO 8
bb(i,1)=SUBSTR(aa(i),1,AT(",",aa(i),1)-1)
FOR j=2 to 31
bb(i,j)=SUBSTR(aa(i),AT(",",aa(i),j-1)+1,(AT(",",aa(i),j)-AT(",",aa(i),j-1))-1)
ENDFOR
endfor
这种办法是不是太笨了!
xlrecno.rar
(681 Bytes)
[此贴子已经被作者于2019-5-23 09:23编辑过]