Binary Files in BASICA - Can It be done? 
Author Message
 Binary Files in BASICA - Can It be done?

Here is what I want to do:

I want to open up and read a binary file (contains $1A's) from BASICA or
GW-BASIC.  Is this possible??

I know that I can do it from QBASIC with the "BINARY" Keyword, however,
how was it done in BASICA?  When I open a file, it will abruptly end at the
first EOF ($1A, #26) that it encounters.  Was there a workaround?

Com'mon you old programers,  how was this done -- or was it?

Paul

For Email: Remove the "Z" from Zibm.net



Sat, 07 Apr 2001 03:00:00 GMT  
 Binary Files in BASICA - Can It be done?

Quote:

>I want to open up and read a binary file (contains $1A's) from BASICA or
>GW-BASIC.  Is this possible??

Open the file with mode RANDOM and LEN=1.
--

Sun Valley Systems    http://personal.bhm.bellsouth.net/~judmc
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


Sat, 07 Apr 2001 03:00:00 GMT  
 Binary Files in BASICA - Can It be done?

Quote:

>> I want to open up and read a binary file (contains $1A's) from BASICA or
>> GW-BASIC.  Is this possible??

>> I know that I can do it from QBASIC with the "BINARY" Keyword, however,
>> how was it done in BASICA?  When I open a file, it will abruptly end at
the
>> first EOF ($1A, #26) that it encounters.  Was there a workaround?

>BASICA also can open files with binary mode, what's the problem? works the
same
>way as QB!

Not quite.  GW-BASIC doesn't allow the BINARY keyword.  You CAN open a
binary file with the RANDOM keyword.

OPEN "somefile.dat" FOR RANDOM AS #1 LEN=1
FIELD 1, 1 AS C$
FOR I%=1 TO LOF(1)
    GET 1
    PRINT C$;" "
NEXT
CLOSE

This will get all the bytes in the file regardless of what they are.

Tom Lake



Sat, 07 Apr 2001 03:00:00 GMT  
 Binary Files in BASICA - Can It be done?
Hellom

Quote:
> I want to open up and read a binary file (contains $1A's) from BASICA or
> GW-BASIC.  Is this possible??

> I know that I can do it from QBASIC with the "BINARY" Keyword, however,
> how was it done in BASICA?  When I open a file, it will abruptly end at the
> first EOF ($1A, #26) that it encounters.  Was there a workaround?

BASICA also can open files with binary mode, what's the problem? works the same
way as QB!

Best Regards: Bogomil Alexandrov
Brunel University



Sun, 08 Apr 2001 03:00:00 GMT  
 Binary Files in BASICA - Can It be done?

Quote:

>> I want to open up and read a binary file (contains $1A's) from BASICA
>> or GW-BASIC.  Is this possible??

>> I know that I can do it from QBASIC with the "BINARY" Keyword, however,
>> how was it done in BASICA?  When I open a file, it will abruptly end at
>> the first EOF ($1A, #26) that it encounters.  Was there a workaround?

>BASICA also can open files with binary mode, what's the problem? works
>the same way as QB!

Really?  Please post the syntax. :-)
--

Sun Valley Systems    http://personal.bhm.bellsouth.net/~judmc
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


Sun, 08 Apr 2001 03:00:00 GMT  
 Binary Files in BASICA - Can It be done?
Hello,

Quote:

> >> I want to open up and read a binary file (contains $1A's) from BASICA
> >> or GW-BASIC.  Is this possible??

> >> I know that I can do it from QBASIC with the "BINARY" Keyword, however,
> >> how was it done in BASICA?  When I open a file, it will abruptly end at
> >> the first EOF ($1A, #26) that it encounters.  Was there a workaround?

> >BASICA also can open files with binary mode, what's the problem? works
> >the same way as QB!

> Really?  Please post the syntax. :-)

well, at least my one can.... but it's not really basica, it's some sort of
basica compatible one that is bulgarian! Although looks very similiar and acts
the same way... it supports it. Not quite sure about the real BASICA.

Best Regards: Bogomil Alexandrov



Sun, 08 Apr 2001 03:00:00 GMT  
 Binary Files in BASICA - Can It be done?

Quote:

>well, at least my one can.... but it's not really basica, it's some sort of
>basica compatible one that is bulgarian! Although looks very similiar and acts
>the same way... it supports it. Not quite sure about the real BASICA.

hey - BB = BulgarBasic - show us a bit of it here so Judson can add it
to his resume list.

govoryliy bulgarskiy, tovarisch ?

(c'mon, Judson - I'm just kidding !).

Regards,Tom Werry  gpsnav at pacific dot net dot sg
Programmer's Logic:   Press ENTER to exit.  (laugh now, here)



Mon, 09 Apr 2001 03:00:00 GMT  
 Binary Files in BASICA - Can It be done?
Hiya,

Quote:

> >well, at least my one can.... but it's not really basica, it's some sort of
> >basica compatible one that is bulgarian! Although looks very similiar and acts
> >the same way... it supports it. Not quite sure about the real BASICA.
> hey - BB = BulgarBasic - show us a bit of it here so Judson can add it
> to his resume list.

Well I lost it long time ago.... All I have left from it is the manual :))) the
binary
keyword for files is documented there....

| govoryliy bulgarskiy, tovarisch ?

:)))

Best Regards: Bogomil Alexandrov



Mon, 09 Apr 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Binary files - what am I doing wrong?

2. Binary Files in BASICA - Thanks!!!

3. reading binary files, can't be done

4. Need help turning basica binary into qbasic ascii!!!

5. Cans access2.0 engine access btrieve files?

6. Recordset: What am I doing wrong?

7. What am I doing wrong??

8. What am I doing wrong?

9. Help with syntax. What am I doing wrong

10. What am I doing wrong?

11. What am I doing wrong?

12. What am I doing wrong?

 

 
Powered by phpBB® Forum Software