[Gambas-user] fastest way to "zero-out" a huge binary file
Benoît Minisini
gambas at ...1...
Sun Jan 24 15:20:26 CET 2010
> Public Sub Button1_Click()
>
> Dim hFile As File
> Dim LastChar As Byte
>
> hFile = Open bigfile For Input
>
> ' Should get 3930677248
> Debug Lof(hFile)
>
> Seek #hFile, 3930677241
>
> ' Should get 3930677241
> Debug Seek(hFile)
>
> Read #hFile, LastChar
>
--> Beware! The syntax of Read has changed in Gambas 3.
Now you should do:
LastChar = Read #hFile As Byte
Regards,
--
Benoît Minisini
More information about the User
mailing list