Why does this not work? :) Trying to write an integer over an entire file.
Uncommenting the seekfile line doesn't work either.
The following method DOES work, but isn't suitable due to any file larger than a certain size resulting in a negative value for filesize()
+BlackD
timer=MilliSecs() fileout=OpenFile("test.txt") Print "opened!" SeekFile fileout,0 While Not Eof(fileout) WriteInt fileout,0 ; SeekFile fileout,(FilePos(fileout)+4) Wend CloseFile fileout timeelapsed=MilliSecs()-timer Print timeelapsed/1000 Print "done!" Delay 200 End
Uncommenting the seekfile line doesn't work either.
The following method DOES work, but isn't suitable due to any file larger than a certain size resulting in a negative value for filesize()
timer=MilliSecs() fileout=OpenFile("test.txt") Print "opened!" for currentint = 0 to filesize("test.txt") step 4 SeekFile fileout,currentint WriteInt fileout,0 Next CloseFile fileout timeelapsed=MilliSecs()-timer Print timeelapsed/1000 Print "done!" Delay 200 EndAny ideas why EOF isn't working here? In fact, it doesn't actually write ANY bytes in the first example. ?? No idea why not. :( It's doing pretty much the same as the second one, except the second one relies on a counter to seek.
+BlackD