ik schreef: > Hi Sorry for the delay in responding > Some remarks at first glance: for m := 0 to readcount do Should be: for m := 0 to readcount-1 do It would better to use either cshort or smallint. I think fpread and fpwrite expect sizes in bytes and not in cshorts (or is a cshort 1 byte). Vincent