Help required with packer related problem
Posted: Mon Apr 28, 2003 2:10 pm
here's my simple code to test writing some numbers to a file, packing the file, and then retrieving the numbers from the packed file:
But the first number retrieved with PeekL is wrong. Can anybody please explain why? am I doing something wrong?
Code: Select all
Dim array.l(8)
Debug("original values")
For f=1 To 8
array(f)=Random(1000)
Debug(array(f))
Next
CreateFile(0, "test")
UseFile(0)
For f=1 To 8
WriteLong(array(f))
Next
CloseFile(0)
CreatePack("test.packed")
AddPackFile("test")
ClosePack()
OpenPack("test.packed")
memaddr=NextPackFile()
ClosePack()
Debug("retrieved values")
offset=0
For f=1 To 8
Debug(PeekL(memaddr+offset))
offset=offset+4
Next
End