Re: Include system
- Posted by Derek Parnell <ddparnell at bigpond.com> Dec 31, 2006
- 1096 views
Pete Lomax wrote: > > Derek Parnell wrote: > > 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. > Like Chris Bensler I just assumed this was always the case. I can put the 20 > or so win32lib files in say w604/ and include w604/win32lib.ew without making > any changes either to the sources or path/euinc/eudir settings. I'm not sure if I'm understanding you here. Are you saying that this actually works with Euphoria 3.0 right now? If so, I can't get it to work. This is the message I get ... C:\>exwc C:\projects\eu_proj\win32lib\win32libcurrent\Demo\bitmap.exw C:\projects\eu_proj\win32lib\win32libcurrent\Demo\bitmap.exw:1 can't find win32lib.ew in C:\projects\eu_proj\win32lib\win32libcurrent\Demo or in c:\projects\eu_proj\euinc;.\include;..\include or in C:\EUPHORIA\include include win32lib.ew > Not sure if Chris has released the source mods he made for this yet. > You'll have to let me know if you want a sneak preview of my 0.0.2. Or are you saying that this is yet-to-be-released update to Euphoria? > > For example's sake, let's > > use the symbol "^" to represent the including file's directory. > CChris has already beat me to saying that "./" is a much more natural > (and backward compatible) way of expressing this intention. I considered > treating > this specially but in the end decided against it. I must strongly disagree with you on that point. The path "." is already assigned a meaning. I means relative to the current working directory of the shell. Thus something like ".\series.e" is saying that "series.e" is expected to reside in the shell's current working directory. Also, I read that some are suggesting the paths beginning with "\" should be interpreted as being relative to the including file. HOwever, once again, this already has a meaning. When a path begins with a slash, it means that it is relative to the root directory of the shell's current drive. Thus "\util\series.e" means that the file "series.e" is expected in "C:\util" (assuming C: is the current drive) and not relative to the including file. > If two user contributions "include .\series.e" then it would force users to > install both in the same directory and I can foresee a new "dll hell" if > installation > must put things in EUINC dirs because it is no longer allowed to have a > private > copy of some-but-not-all files. And that is why I see the need for either a new special symbol in the include statement to indicate 'relative-to-the-including-file', or the search algorithm must change to do this automatically for all include statements. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell