Re: Dynamic includes
- Posted by Ray Tomes <rtomes at ihug.co.nz> Jun 25, 2003
- 472 views
Matt Lewis wrote: > Well, I only saw one reference (in a rather quick search of the mailing list > archives) that was derogatory toward executing strings (besides Rob, of > course). I've thought it would be a good thing to have, and have even > applied some thought as to putting it into the Euphoria source code, but I > always get lost in the scanning/parsing routines. Well it would be easier to implement in an interpreter than in a compiled version! It is a very different animal to Euphoria, but it might be worth looking at what NoteTab does. It substitutes variable names by their values into the "source line" and then rescans and does the same again as often as required. This does allow some very clever stuff to be done and I for one would like to have some such facility. But making a compiled version of that is rather trickier as I said because usually the variable names are gone by then, but in this case they could not be. Is there already a general facility in Euphoria to access a variable from having its name in a string? This is a useful capability to have. There is one Euphoria command/proc/function that has the variable name as a parameter in quotes - I forget which one.