Re: Include system
- Posted by Derek Parnell <ddparnell at bigpond.com> Dec 30, 2006
- 1109 views
>posted by: ags <eu at 531pi.co.nz> > > >Hi All > >I've just had a thought about the include system, well an observation > really. > >A program in a sub folder of an include file can say something like: > >include ..\file_one.e > >Which sucessfully includes a file from one directory level up. > >But if that file_one.e includes another file from the folder it is in, > eg file_two.e, >the interpreter will not be able to locate it. As we all know, included files that are expressed in relative terms rather than absolute (full path) terms are all relative to a set of 'include' paths. These paths are defined as ... ** The directory in which the executing program resides. ** The list of directories specified in the EUINC environment variable. ** The directory ${EUDIR}/include, where EUDIR is the environment variable that specifies where Euphoria was installed. What would be useful, is a way to specify in the include file name that we want it relative to the file which is doing the including. For example's sake, let's use the symbol "^" to represent the including file's directory. Then in the case you mention one could do this ... ==== FILE_ZERO.EX ==== include ..\file_one.e -- one level up from 'here' ==== FILE_ONE.E === include ^\file_two.e -- same level as FILE_ONE.E IN my case, with Win32lib I'd like to code ... === WIN32LIB.EW === include ^/w32keys.e -- same level as *this* win32lib include ^/w32alloc.e -- same level as *this* win32lib ... etc ... -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell