Re: confusion about include
- Posted by ChrisB (moderator) Aug 07, 2010
- 1291 views
The Euphoria 4.0 documentation, under "4.8.1 include" does not clearly explain "public" and "export".
What exactly do these lines do?
include file1.e public include file2.e export include file3.e -- Is there such a thing as global include file4.e
It used to be simple. Include something and it's included for all my files. What do I gotta do to make it work like it used to?
Hi
Still can keep it simple. Here's what I do, distilling out all the other stuff from Derek and Matt
1. old global still works, or use new export for functions / procedures / variables / constants (plea to devs - please make sure global stays working!) 2. for every 'new file' within your program, include the file that contains the function / procedure or global variable you want to access from your 'new file' 3. use of namespaces is entirely optional
Converted my 20000 + line vet program a while ago using these rules, and it works absolutely fine.
Someone is bound to say, 'yes, but what about the case when.....' - these are likely to be few and far between cases, and I'll cross those bridges when I come to them.
Chris