Program overlays
- Posted by Sabal Mike <MikeS at NOTATIONS.COM> Jan 26, 2001
- 512 views
I'm at a point right now where a certain feature of Euphoria could be very useful if it existed. Right now, if I want to run a different Euphoria program from within my Euphoria program, I need to use system_exec("exw..... This requires a second interpreter to be opened, with a separate shell, separate console, etc. And if I want to pass full control over to the second program, I can't. I have to add an abort(1) statement after this line to release the current program. This all works as far as it goes, but it's not very elegant. What I would like to see (I think it's been mentioned before) is something like the following: run_euphoria("Myprog2.ex","param1 param2 param3") The interpreter would, upon processing this line, run the same cleanup routine internally that abort() uses, but instead of terminating the interpreter, re-initialize it with the new program and command-line options (second parameter in the routine call). I'd love to see a call_euphoria(...) routine where control returns to the original calling program upon termination of the called program, but I imagine that would be more complex and too hard to maintain. I'd be happy with just the first one. If Rob has any religious objections to a run_euphoria statement, I suppose I could continue to kludge along unelegantly . I'd also like to get some feedback from others whether or not they would find this kind of functionality useful. If it's just me, then forget it.... Michael J. Sabal m_sabal at yahoo.com