Re: Multi-purpose include/standalone files - neat trick
- Posted by Sabal.Mike at notations.com Oct 24, 2002
- 394 views
I understand exactly what you are doing, and I think it is a wonderful, concise idea. My only issue is stylistic. I like all my includes at the top of a program without any procedures before them confusing things. And when I'm writing a library or multi-use module, I don't want the programmer of the main program to have to do anything special to make it work; especially since I'm usually that programmer and I forget that I need that option defined, etc. If I'm including a module, I want to plug and play with no hassles. The command_line option, while longer and messier in the include program, does allow the include to be plug and play. The best option would be a means of the interpreter telling a file whether or not it is included as part of a larger program. A single, clean, efficient built-in function would remove the need for any of our hoop-jumping be it routine_id, command_line, or nested includes. Mike Sabal petelomax at blueyonder.co.uk wrote: OK, I'm listening. Explain to me how using command_line() is better. It works, I agree, but better?!? I don't want to be aggressive about this, but I really liked the idea I had & am worried you haven't got it yet. (or you see a flaw I don't). Pete