TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: PETER DALTON
from: CHRIS GUNN
date: 1998-03-23 20:00:00
subject: Re: QB.QLB+QBSER.QLB=BOTH.QLB

 PD> erm, no. I have some sub-routines that I add in as required and then
 PD> call with a gosub...it works. What I do when the program gets too big
 PD> is separate it off into smaller chunks, each one dealing with a
 PD> separate part of the overall program and then from the main program I
 PD> shell to each sub-program as required. Again, it works...
 PD> Thanks for a detailed reply though, I'll have a play around with it.
Howdy Peter,
You can use GOSUB's inside an INCLUDE file if you want.  It's just not as 
handy
as using subroutines.  The following may be handy for other folks as well:
If you have a GOSUB titled CheckIt:, just above the title type "SUB CheckIt" 
and press  or the down arrow.  Bingo, and you will be inside the new 
subroutine.  Press  and go back to your main module.  You should be back 
at the top of the GOSUB and the line you just typed will be gone.
Hold down a  key and block what you want to move and  
it. (make sure you have Shift pressed)  Press  and move back to the new 
subroutine.  Use  and paste it in.   You can also use 
 and copy it first.  Then go back and delete the original.
Check out your new subroutine to see what variables need to have data carried 
into them.  Add them inside the parens.  It should look something like:
SUB CheckIt(FilePath$, FileName$, Index%)
Don't forget to delete the original CheckIt label.  Not sure where all the 
GOSUB lines are?  Press  and QB will take you to the first one so you can 
change it to read "CALL CheckIt()" and the matching entries for what you put 
in the SUB's parens.  The type of variable has to match but where FileName$ 
is can be "MYFILE.DAT".  This can be real handy because the same subroutine 
can now be used for NewFile$, NextFile$, or AnyFile$.
After you Save what you've done, go to the top of your main module.  You'll 
find a new DECLARE SUB CheckIt() line there to match what you created.
Some of my programs have EXE's over 300Kb and have as many as five loaded 
source code modules as well as my custom QLB's.  My hotel program has three 
big EXE's that RUN each other.  I prefer using RUN instead of CHAIN or SHELL.
You can build some big stuff with QuickBasic.
Chris
--- FMail 0.96â
---------------
* Origin: BIZynet - Worldwide Business via the E-Ways (1:15/55.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.