I'm not sure why this works and nothing else, but it does:
And somewhere in your program before that put
n$ = space$(x)
where x is however many bytes you want to read at once. Basically, it will fill up the whole string with the proper records from file. You can use this to your advantage actually. I use this to make fast file access routines, since a string can be 65536 characters, you can read and write in 64KB chunks!
Use the same method to write binary files. For example, if you wanted to put "SomeMessage" 20 times into a new file, do like so:
n$ = "SomeMessage"
open "file.bin" for binary as #1
For a = 1 to 20*len(n$) step len(n$)
put #1, a, n$
Well, I hope that answers it.
: yo, i need to access binary files - read and write to them and i use 'open "file.bin" for binary as #1' and then try using 'get #1,1,n' and all i get is zeros and when i use a string as n i just get nulls - i dont know what im doing wrong. please help! i need a tutorial on read/write with binary files or something - thanks all who read this and big thanks to all who help
: -The Black Frog