Qbasicnews.com

Full Version: code in txt files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Say you have a really really big file could you put some code into .txt or .dat files and run the code from q as a sort of function?
Ok... well that was rather short, plasma.

Andy: Use a library. Its a collection of subs and functions that you can make yourself and call from Qbasic, with all the code in an external file. Look up the link above, like plasma suggested.
Quote:Ok... well that was rather short, plasma.
Plasma's always short when I gets to this kind of stuff Big Grin
Quote:Ok... well that was rather short, plasma.

Andy: Use a library. Its a collection of subs and functions that you can make yourself and call from Qbasic, with all the code in an external file. Look up the link above, like plasma suggested.

Incase you didnt notice, Plasma has given a link which describes everything about the '$include command =P
thanks
Quote:
dark_prevail Wrote:Ok... well that was rather short, plasma.

Andy: Use a library. Its a collection of subs and functions that you can make yourself and call from Qbasic, with all the code in an external file. Look up the link above, like plasma suggested.

Incase you didnt notice, Plasma has given a link which describes everything about the '$include command =P

Heh heh... I only realised that afterwards. and besides, its nice to actually answer the guy.... its nicer that way Tongue
This brings up a question of mine...you can't use SUBs in seperate modules? Why didn't QB implement that functionality? Because I rarely use FUNCTIONs...shame I can't seperate my subs. Oh well.
Well, zack, you may have already realised this, but you can just use librarys to share subs across modules. Then you can have an intermediatery supply of subs that all modules can access. great.
I see...So package my functions, constants, and variable declarations in a seperate module...and some code, if needed. And if I need subs, then make a lib. Thanks. Smile
Pages: 1 2