Re: help with include files

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

>What I am trying to do now is to modify a program to use a certain
>include file based on the value of a global sequence which may be
>changed by the user while running the program.
>
>What I tried is this:
>
>    if compare(THISSEQ, "INCA") = 0 then
>       include a.e
>    elsif compare(THISSEQ,"INCB") = 0 then
>       include b.e
>    end if
>
>The results is that Euphoria expects "end" not "include".


Unfortunatly Euphoria doesn't provides conditional include :(
That's a feature that would be quite useful for example to have a program to
run either under DOS32 or WIN32, autodetecting it's enviorment and
dinamically loading the appropiate routines. There's still a problem with
the interpreter (ex.exe or exw.exe), but before that we need conditional
inclusion.

Anyway I think you may be able to simulate the effect using the function
routine_id(). It's complex and difficult to maintain. Personally I have
never used routine_id (except for some experimetal WIN32 tasks).

Regards,
    Daniel Berstein
    daber at pair.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu