Re: random accesss files
- Posted by "Juergen Luethje" <j.lue at gmx.de> Dec 15, 2004
- 481 views
Bernie Ryan wrote: > To the QBASIC Grus: > > In qbasic using > OPEN some_filename FOR RANDOM AS #1 LEN = LEN(some_record) > > Is any code written in euphoria that emulates this > for DOS ? , How about Windows ? I'm not a QBASIC Guru, but I've been programming in PowerBASIC for DOS (which is kind of "improved QBASIC" ) for several years. In order to emulate access to a so called BASIC "random access" file, in Euphoria you basically (no pun intended) have to use a combination of seek() and get_bytes() for reading or seek() and puts() for writing. DOS or Windows doesn't matter. A famous BASIC guru is Ethan Winer. The old 'bible' for DOS BASIC programming, his book "BASIC Techniques and Utilities*, is now available on the web at no charge: http://www.ethanwiner.com/ "winer.zip" contains plain text files and program source code as separate files, "ethan.zip" contains the book in PDF form. See chapter 6 for "random access" files. Regards, Juergen -- Have you read a good program lately?