Fast load of files.
BLoad filename$, addr
filename$:sexp; file name
addr:integer expression
BLoad (block load) is used to read the file previously stored with BSave (block save). The parameter addr contains the address where in memory the file should be loaded.
OpenW # 1
Local addr%, count%, i%
Dim a%(999), b%(999)
For i% = 0 To 999
a%(i%) = Rand(1000)
Next i%
addr% = V:a%(0)
count% = (V:a%(1) - V:a%(0)) * 1000
BSave "C:\TEST.DAT", addr%, count%
addr% = V:b%(0)
count% = (V:b%(1) - V:b%(0)) * 1000
BLoad "C:\TEST.DAT", addr%
Kill "C:\TEST.DAT" // Tidy up line
For i% = 1 To 10
Print b%(600 + i%)
Next i%
BSave and BLoad access the file in a non-sharing mode; they do not work with internal filenames starting with ':'.
{Created by Sjouke Hamstra; Last updated: 26/09/2014 by James Gaite}