|  |  | > > >     I think the "interface block" concept is the most promising
> > >     formulation that we have so far.  It's something like
> > >     the main(..) function in C, you're only allowed to have one.
> Er, I meant you can't have the include files request values. Oops! :-)
	That's right - but this is actually a feature - it puts
	one module in control of user interaction.  
	You simply design the script to pass values from the
	interface block to the included files, or to the
	macros.  Something like:
interface
{
	#declare ShowBackground = 1;
	#declare ShowLandscape = 1;
	#declare NumberOfTrees = 100;
}
#if (ShowBackground)
  #include "background.inc"
#end
#if (ShowLandscape)
  #include "landscape.inc"
#end
// The Trees include uses TREES_NUMBER to
// control the number of generated trees.
#declare TREES_NUMBER = NumberOfTrees;
#include "trees.inc"
--
Nigel Stewart (nig### [at] nigels com)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.Post a reply to this message
 |  |