Re: Modifying the Euphoria interpreter

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

Juergen Luethje wrote:
> 
> CChris wrote:
> 
> > Remember that, if ex.exe tries to compile a program which mentions
> > open_dll(), it errors out even though the the function won't ever be
> > executed because the call is protected by a "if platform()=??? then".
> > The error is generated before the platform dependent code is removed.
> 
> I can't confirm that. Code like the following always worked fine for me:
> }}}
<eucode>
> include misc.e
> include dll.e
> 
> atom Kernel32
> 
> if platform() = WIN32 then
>    Kernel32 = open_dll("kernel32.dll")
> else
>    Kernel32 = -1
> end if
> ? Kernel32
> if getc(0) then end if
> </eucode>
{{{

> Interpreted with exw.exe the code prints e.g. 2088763392, interpreted with
> ex.exe it prints -1 as expected. The code never "errors out".
> 
> Regards,
>    Juergen

Good. I'll have to check if this result holds even when the open_dll() call
is part of the interpreter. Will hopefully check this tonight (5pm here).

CChris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu