数据文件为TXT格式,内存有2000行8列数据,利用VB定义了数组a(2000,8),读入语句用该怎么编写
sFile = "aaaa。 txt"
If CBool(PathFileExists(sFile)) Then
lngHandle = FreeFile()
Open sFile For Input As lngHandle
for i=0 t0 1999
Line Input #lngHandle, strline ’读一行数据到strline
stemp=split(strline,",") ‘拆分一行为8列,列之间是逗号分隔?
for j=0 to 7
a(i,j)=stemp(j)
next j
next i
Close #lngHandle
End If。全部
sFile = "aaaa。
txt"
If CBool(PathFileExists(sFile)) Then
lngHandle = FreeFile()
Open sFile For Input As lngHandle
for i=0 t0 1999
Line Input #lngHandle, strline ’读一行数据到strline
stemp=split(strline,",") ‘拆分一行为8列,列之间是逗号分隔?
for j=0 to 7
a(i,j)=stemp(j)
next j
next i
Close #lngHandle
End If。收起