Reading from Files?
Posted: Sat Dec 09, 2006 2:36 pm
I've been working with the Qbasic BootCamp tut series, and i've read 4 pages and did the assignments. Now i'd like to take a break from learning and try to use some of it on a project.
One problem i had from the start is reading from files. From what the tut says, i can only read one line, or read numerical data into an array. What i needed to do was read an entire SUB from a file.
I've got a fair-sized graphic designed (one of what is going to be quite a few of them), and it takes up not a few lines, and i don't want the main program flooded with all that. It would be much easier to just write a txt file and read it into it, but i just can't seem to figure out how that works.
I used to use a program called DarkBASIC that had a command called APPEND, then i just called the SUB name and it read all the commands, but i don't think qbasic has anything like that, does it?
If not, is there anything else i can do here? This is all assuming SUBS use up the size limit, which i don't know if it does or not.
One problem i had from the start is reading from files. From what the tut says, i can only read one line, or read numerical data into an array. What i needed to do was read an entire SUB from a file.
I've got a fair-sized graphic designed (one of what is going to be quite a few of them), and it takes up not a few lines, and i don't want the main program flooded with all that. It would be much easier to just write a txt file and read it into it, but i just can't seem to figure out how that works.
I used to use a program called DarkBASIC that had a command called APPEND, then i just called the SUB name and it read all the commands, but i don't think qbasic has anything like that, does it?
If not, is there anything else i can do here? This is all assuming SUBS use up the size limit, which i don't know if it does or not.