Re: seek() bug?
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 15, 2002
- 520 views
Kat writes: > So is there a buglist for seek? There aren't any known bugs in seek(). EDS uses seek() extensively, and there aren't any known bugs in EDS either. > Is seek() maybe allergic to long filenames, or > filenames with sp aces in them? The file name is irrelevant to seek(), but there are some potential "gotchas". 1. It's strongly recommended that you open the file in binary mode, "rb", "wb" or "ub". (otherwise \r\n is secretly converted to \n by the o/s, and you'll go crazy trying to set the file position correctly) 2. Opening in append mode, "a" is possibly a bit dicey. A bug was fixed in 2.3 official in that case because of a Watcom bug. 3. The Euphoria manual states: "After seeking and reading (writing) a series of bytes, you may need to call seek() explicitly before you switch to writing (reading) bytes, even though the file position should already be what you want." If you can reduce the problem to something small, but runnable, and post it here, maybe we can see the problem. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com