Re: Rob Idea for dynamic include

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bernie Ryan wrote:

>Rob:
>    I have an idea of how to implement a simple conditional
>
>    include in your Euphoria Interpreter.
>
>
>    Add a new keyword called IGNORE ( or what ever you want to call it )
>
>    Then I do something like the following:
>
>   if IWANTTOINCLUDETHIS then
>     IGNORE
>   end if
>
>   -- include thisfile.e
>
>   Then when your interperter sees the keyword "IGNORE" and It skips
>   over the first -- comment operator that it sees and continues on
>   parsing the program in the normal way.
>
>   This would only require that you added a additional keyword and a
>   a little code to bypass the -- comment operator
>
>  Bernie

How does this make the include dynamic. It would make it switchable, but
dynamic to me means something that is alterable at the time of execution
as in "include xxx" where xxx is a variable. Besides, at the moment, all
comments are completely ignored/thrown away. Since includes are only
found in the main line of the code, what would change that would cause
the item to be included/not included since the main line of code does not
repeat itself. I see the need for dynamic includes, but I'd like to know what
this is intended to accomplish. I'm sure there is something obvious here
that I am missing...unfortunately I can't figure out what smile

Everett L.(Rett) Williams
rett at gvtc.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu