[DGD]path_include

Tim Vernum tpv at acay.com.au
Wed Jun 14 07:10:18 CEST 2000


>Is it the intention that path_include(string from, string path) in the driver
is only called with a path
>of an existing file?

No.

>So, do I have to check myself if the file exists?

The driver object should provide the path to an include file, if it can find
one, for the string given in the #include.

I'm at work, so I can't test, but I beleieve in your case, it is safe to return
the path given to you, both times.
DGD will note that the file you returned doesn't exist, and try the next path
in your config. If it gets to the end without finding an existing file, it will
then cause a compile error in the program being compiled.

AFAICT (since I've never tried to do it), it is theoretically
possible for the object being compiled to have
        #include "STD_ROOM"
and the driver to translate that to
   "/include/std/room.h"
if you so wish.

If you look through the list archives (available from 
ftp.dworkin.nl) you will see a few recommendations, that
playing with include files, is one way to do all sorts of
trickery, like having different auto objects for different
programs.

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list