[futurebasic] Re: [FB] INCLUDE an INCLUDE (was: recurring bug)If it works though, more power to ya.

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: Mel & Carol Patrick <mel@...>
Date: Mon, 14 Jun 1999 11:21:19 -0700
>>> I've always heard it was bad karma to INCLUDE an INCLUDE... If it works
>though, more power to ya. <<
>
>If someone has thought these same thoughts and can express them articulately,
>I'd like to hear about it. Y'see, my son does includes-within-includes (teeny
>little files, he could just as well consolidate everything & stick in a few
>Labels for navigation) and I'd love to come up with an argument more
>sophisticated than "MUST you do that? It drives me right up the wall!!!!"

I have a number of projects that have includes in the includes. Mine are
always like this

project.MAIN
project.GLBL
project.HEAD
project.INCL
project1.INCL

The HEAD module is for the global DEF FN's that I use in the various INCL
files so I don't need to replicate the FN's in each INCL module. The .HEAD
is NOT included in the MAIN module, although it compiles, it's only
referenced in the additional INCL files. Therefore the MAIN module looks
like this :

COMPILE 0,_caseInsensitive_strResource:' _programmerInsensitive
WINDOW OFF:COORDINATE WINDOW
DEF MOUSE=-1:CURSOR 4:WIDTH -2
OUTPUT FILE "BuggyProject"
'
GLOBALS "project.GLBL"
SEGMENT
END GLOBALS
'
INCLUDE "project.INCL"
SEGMENT
'
INCLUDE "project1.INCL"
SEGMENT
-------------
The header for the .HEAD file look like this :

INCLUDE FILE _aplIncl
COMPILE 0,_caseInsensitive_strResource
GLOBALS "project.GLBL"
END GLOBALS
'
DEF FN GdrawText(Temp$,x,y,just) USING GLBLdrawText&:'     draw text onscreen
'
-------------
The header for the INCL files looks like this :

INCLUDE FILE 1
COMPILE 0,_caseInsensitive_strResource
'
GLOBALS "project.GLBL"
END GLOBALS
'
INCLUDE "project.HEAD"
'
' followed by the normal amount of buggy functions in any project
--------------
Works fine and has for years. Learning to do the HEAD file so I could have
global functions was the hard part.


Mel Patrick
mel@...