Author |
Message |
prsc.. #1 / 8
|
 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 |
|
 |
Judson McClendo #2 / 8
|
 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 |
|
 |
Tom Lak #3 / 8
|
 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 |
|
 |
Bogomil Alexondro #4 / 8
|
 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 |
|
 |
Judson McClendo #5 / 8
|
 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 |
|
 |
Bogomil Alexondro #6 / 8
|
 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 |
|
 |
Tom Wer #7 / 8
|
 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 |
|
 |
Bogomil Alexondro #8 / 8
|
 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 |
|
|