Re: A question to Robert Craig
- Posted by Robert Craig <rds at EMAIL.MSN.COM> Jul 27, 1998
- 582 views
Karlheinz Nester writes: > it seems that the loading order of the include files is essential ?? > Is that right ?? How to avoid this ?? I think you can include any of the standard .e files in euphoria\include in any order. Other people may have written include files that assume that another include file will already be present. The global symbols of the include file will be defined at the point where you place the include statement, so you should include the file before you try to access the global symbols. (Non-global symbols are not "visible", except in the include file itself.) One handy thing about Euphoria includes, that is not true for C/C++ and some other languages, is that Euphoria will ignore subsequent attempts to re-include a file that has already been included. (In C/C++ you will be flooded with messages about multiply-declared symbols etc., so you have to set up an awkward "ifdef" mechanism to avoid this situation.) In Euphoria, if your include file needs another one, feel free to add an include statement for it, e.g. first.e: include second.e .... .... main.ex: include second.e include first.e Although main.ex already includes second.e, the "include second.e" inside first.e won't hurt, and will allow first.e to work, even if main.ex doesn't include second.e. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/