Re: EU bug??
- Posted by Robert Craig <rds at RapidEuphoria.com> Aug 06, 2003
- 407 views
George Walters wrote: > If you happen to try and open a print file twice, both with the same file > name, EU can't produce an error file. I made that mistake and it took a long > time to find it.... since it occurred after many many reads and writes... > here's the code. I accidently set pageNbr back to zero. You know, thinking > about this, I opened it again for each customer I ran into and it quit in > the H's, so I have no idea what it was doing. HOW could it open the same > output file so may times?? Does it make sense to open the same sequential > file for output multiple times? Euphoria does not try to stop you from opening the same file or device two or more times. I don't know of any language that does. You'll get a new file number (handle) for each open(). It might make some sense if you are reading two logically different files, that just happen to be the same file in a particular case, but in general it's probably not a good idea. I/O buffering will cause erratic results if you are writing via two different handles. Also keep in mind that Euphoria sets a limit of 25 simultaneously open files. This is mainly to catch errors where you are in a loop, opening, but never closing files. Without Euphoria's limit the O/S would eventually stop you, but the error wouldn't be very clear. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com