发表评论(0)作者:不详, 平台:VB6.0+Win98, 阅读:10835, 日期:2001-05-09
Read and Write Arrays Quickly
You can read and write arrays quickly from files using Put and Get. This is much faster than reading and writing the array one entry at a time.
Dim arr(1 To 100000) As Long
Dim fnum As Integer
fnum = FreeFile
Open "C:\Temp\xxx.dat" For Binary As fnum
Put #fnum, , arr
Close fnum
You can read and write arrays quickly from files using Put and Get. This is much faster than reading and writing the array one entry at a time.
Dim arr(1 To 100000) As Long
Dim fnum As Integer
fnum = FreeFile
Open "C:\Temp\xxx.dat" For Binary As fnum
Put #fnum, , arr
Close fnum