View Single Post
  #1 (permalink)  
Old 05-20-2007, 07:20 PM
Put Claude Put Claude is offline
Knows the basics
 
Join Date: May 2007
Posts: 87
Default behavior of bin.WriteBytes(array())

hi,

If the file 'name' has a lenght of 500 bytes, and I rewrite that file with a array
that is only 150 bytes, like below, I expect the file will be closed after the lenght of the last writed array (150 bytes).
The file still stays on a file-lenght of 500 bytes... enoying thing...

FileOpen (c1,name,cRandom) 'open file for binary use
bin.New1(c1,True) 'make binair file-object
bin.WriteBytes(igni()) 'writes the complete igni-array binair
FileClose (c1)

Of coarse there are work arounds, but is this the normal behavior...

Put Claude Belgium
Reply With Quote