1. random accesss files

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 ? 

Bernie


My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.ew

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » topic index » view message » categorize

2. Re: random accesss files

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 ? 
> 
> Bernie
> 
> 
> My files in archive:
> w32engin.ew mixedlib.e eu_engin.e win32eru.ew
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>
> 

already written code to access files in a random manner is:
eds using database.e
probably edbgui.e or 
eugrid
or tsunami.ew written by Euman


the file of course contains records of fixed size and record keys (not necesary
to be used).

a search on database.e in archives will show more written.

later
rudy

new topic     » goto parent     » topic index » view message » categorize

3. Re: random accesss files

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" smile) 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?

new topic     » goto parent     » topic index » view message » categorize

4. Re: random accesss files

Thanks Rudy and Juergen

Bernie

My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.ew

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu