QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: MWheatley on May 27, 2020, 12:23:43 pm
-
Gosh! It's over 30 years since I last wrote some BASIC to pull in a stream of numbers from a file.
The resulting program must (for reasons that are too complicated to explain) be QB45 compatible, although it will also be run under QB64.
So... are there any tricks to getting QB to navigate to a file's location? Are there any libraries out there that do this?
Trivially simple for modern-era code, I suppose, but we're talking old school here.
TIA
Malcolm
-
This may be a place to begin. In this section of my tutorial I outline file input/output and drive navigation.
http://qb64sourcecode.com/task13.html
-
I'm not sure if there is also an example in the tutorial with the INPUT$ function, this is the right function, that definitely works properly for reading binary files in both QB 4.5 and QB64.
-
I'm not sure if there is also an example in the tutorial with the INPUT$ function, this is the right function, that definitely works properly for reading binary files in both QB 4.5 and QB64.
You're correct. In the old version of the tutorial I included INPUT$ with a demo of how to use it as a hidden password entry field. I'll make a note to add INPUT$ to task 13 with examples. Thanks for pointing that out.
-
I'm not sure if there is also an example in the tutorial with the INPUT$ function, this is the right function, that definitely works properly for reading binary files in both QB 4.5 and QB64.
That's useful, as I had explicitly ruled out INPUT$ in favor of LINE INPUT. Looks like I need to do more reading!
Malcolm
-
This may be a place to begin. In this section of my tutorial I outline file input/output and drive navigation.
http://qb64sourcecode.com/task13.html
Thanks, Terry. That was very useful. I didn't know about some of those new QB64 commands.
Malcolm