1. Euphoria 2 BUG!!
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Nov 26, 1997
- 510 views
I'm sorry to inform you people this, but I just found a bug in the dynamic routine calling in Euphoria 2 (alpha) In the zipped attachment you'll find a program called "trybug.ex" It will show the bug, that is in routine_id () In the file gfxbuilt.e you'll see a function declaration, and right after it, you'll see this: -- begins ------------------------------------------------------------------- end function -- end of function: GRAPHIX_Init ID_Inits[GRAPHIX] = routine_id ("GRAPHIX_Init") -- ends --------------------------------------------------------------------- routine_id actually returns -1, which means I haven't declared a function called GRAPHIX_Init yet. The scary part is, and the part that proves it has to be a bug, is that, when you declare the function global instead of local, it *will * work. That's very strange, cause I am requesting the routine_id right after the function ending... Also try to execute the file gfxbuilt.e on its own, it will work then also... (It shouldn't make a difference ?!?!?!) As soon as Robert gets back, I'll send him this mail also. (and prolly ruin his vacation mood) Ralf Nieuwenhuijsen nieuwen at xs4all.nl
2. Re: Euphoria 2 BUG!!
- Posted by David Cuny <dcuny at DSS.CA.GOV> Nov 26, 1997
- 500 views
Hi, Ralf. Robert knows about the bug. The problem apparently has something to do with how Euphoria resolves name conflicts. All included routines must be declared as global. But there is a more serious bug than that. When you bind your file, routine_id() will fail to find ANY routine in an included file, even if it is declared as global. This is because bind shrouds all the routine identifiers, except for the globals declared in the main file. This means that all the routine id's in the included files are shrouded, even if they are declared as global. This is why, for example, you can't successfully bind any programs with my Win32Lib. There are a number of ways around this: 1. Declare the routines as global, and physically attach the file instead of including it; or 2. Declare the routines as global, and (ick) re-declare them as global in your program with something like: global procedure foo_wrapper( integer bar ) foo( bar ) end procedure I think he's promised a fix by the Beta, but I can't remember. -- David Cuny