Re: Dynamic file includes

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

Ron Weidner wrote:
> 
> 
> How can dynamic file includes be accomplished...
> 
> }}}
<eucode>
> --tested but this didn't work
> sequence fn = "/blah/to/file/hello.e"
> include fn
> <font color="#330033"></eucode>
{{{
</font>
> 
> 
> How can the EUDIR be configured at runtime...
> 
> }}}
<eucode>
> -- again no joy here
> system ("export EUINC=$EUINC:/blah/to/file/")
> puts(1, getenv("EUINC"))
> <font color="#330033"></eucode>
{{{
</font>
> 
"Include" is a top-level statement, string data cannot be past to it via
variables. Filepaths and/or relative filenames can only be placed next to the
statement, along with the optional namespace declaration.

But to answer your question, Euphoria doesnt support dynamic inclustion...
because all the included files and the current source file are entirely
scanned/parsed and converted to intermediate language (IL) before the interprter
executes it. In previous versions of Euphoria, blocks of code were
scanned/parsed, converted to IL, then executed (I think)? and some sort of
"Mickey Mouse" method would allow for partial solution, or so I heard. I don't
think Euphoria needs them, it would be difficult to work out with bound &
translated/compiled programs in that all the included files would embedded into
the application.

Regards,
Vincent

--
Without walls and fences, there is no need for Windows and Gates.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu