Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
open file in BINARY mode
#1
When i learn basic there is no BINARY mode for open file.

Can someone explain me howto use this mode?

thx
Reply
#2
Here's an example:
Code:
CLS
DIM b AS STRING * 11

b = "Friday the "
a% = 13

'Code to put contents
OPEN "c:\temp.bin" FOR BINARY AS #1
PUT #1, 1, b
PUT #1, , a%
CLOSE #1

b = ""
a% = 0

'Code to get contents
OPEN "c:\temp.bin" FOR BINARY AS #1
GET #1, 1, b
GET #1, , a%
CLOSE #1

PRINT b
PRINT a%
Reply
#3
I think that you only have to read the QB help, and you will understand how binary file open/read/write works.

http://qbasicnews.com/qboho/qckopen.shtml
B 4 EVER
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)