behavior of bin.WriteBytes(array())

Put Claude

Active Member
Licensed User
Longtime User

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