Re: Modifying the Euphoria interpreter

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

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:
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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu