Qbasicnews.com
April 09, 2020, 06:43:37 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: code in txt files  (Read 3860 times)
andy
Senior Member
**
Posts: 175



WWW
« on: February 01, 2004, 03:05:46 PM »

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?
Logged

eminiscing about trapezoids in conjunction with stratospherical parabolas:

No questions asked.

www.stickskate.com
Plasma
Na_th_an
*****
Posts: 1770


WWW
« Reply #1 on: February 01, 2004, 03:11:03 PM »

'$INCLUDE
Logged
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #2 on: February 01, 2004, 05:24:07 PM »

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.
Logged
Neo
Na_th_an
*****
Posts: 2150



« Reply #3 on: February 02, 2004, 06:34:35 AM »

Quote from: "dark_prevail"
Ok... well that was rather short, plasma.

Plasma's always short when I gets to this kind of stuff Cheesy
Logged
TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #4 on: February 02, 2004, 12:21:45 PM »

Quote from: "dark_prevail"
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
Logged
andy
Senior Member
**
Posts: 175



WWW
« Reply #5 on: February 02, 2004, 01:22:51 PM »

thanks
Logged

eminiscing about trapezoids in conjunction with stratospherical parabolas:

No questions asked.

www.stickskate.com
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #6 on: February 02, 2004, 02:36:37 PM »

Quote from: "TheBigBasicQ"
Quote from: "dark_prevail"
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
Logged
Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #7 on: February 02, 2004, 02:40:52 PM »

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.
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #8 on: February 02, 2004, 03:31:28 PM »

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.
Logged
Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #9 on: February 02, 2004, 03:32:55 PM »

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. Smiley
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #10 on: February 02, 2004, 03:33:55 PM »

yup. like making a library specific to just one program.
Logged
TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #11 on: February 03, 2004, 04:23:45 AM »

Zack i would recommend that you dont compile your module(which contains all the functions) into a library. Since if you want to use another library, say Future.Lib, then it would get messy =P.
Logged
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #12 on: February 03, 2004, 06:59:52 AM »

But if you're not using an external lib, then it makes sense.
Logged
TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #13 on: February 03, 2004, 07:01:54 AM »

Yes. But when using an external lib he would have to recompile the lib + his own lib to make a single lib =).
Logged
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #14 on: February 03, 2004, 07:05:29 AM »

Does that use LINK.exe? How do you use it. Ive never linked to libraries before...
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!