Re: Modifying the Euphoria interpreter
- Posted by Juergen Luethje <j.lue at gmx.de> Jun 12, 2007
- 586 views
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