Re: ALAN - '$INCLUDE'


Mon, 21 Aug 1995 12:53:02 EDT

In article <418f7s$ih3@freenet.vancouver.bc.ca>,
dgcarlyl@freenet.vancouver.bc.ca (Dennis Carlyle) says:
> Could someone explain to me how the $INCLUDE directive is supposed
> to work in ALAN? The docs. are superbrief on this, with no examples,
> and I can't get it to work.

Real simple. Let me just crack open the source code for the endlessly
delayed, half-mythical "A Day in the Life..."

Okay. Basically, just do this --

$include 'filename'

in the source code, pretty much anywhere. The contents of 'filename'
will be sucked in to replace the include directive. ALAN will look for
'filename' in whatever directory you're compiling in.

Probably what's causing you grief is that the included file is inserted
into the file you're compiling, as if they were all one single file. So
you have to be conscious of the order things are supposed to be in --
i.e. you can't define a whole batch of objects and then $include a file
full of synonym definitions, and you can't create a bunch of little
files (each with their own verbs, synonyms, locations, objects, etc.)
and have a master file $include them all one after another.

--
                   "The higher the hair, the closer to God."
 <*> mbs110@psuvm.psu.edu: Mark Sachs, Itinerant Graphicist and Webmaster <*>
                     I've gone to build the Supercollider.