1. eu40 build 1188, re:find()
- Posted by jacquesd Sep 28, 2008
- 968 views
somewhere in developpement of euphoria 4.0 re:search() function was replaced by re:find() and I get a warning saying:
Warning ( builtin_chosen ): The built-in find() over rides the global/public find() in: c:\eu40\incl ude\std\regex.e
does it means that somewhere in the code re:find() as been over rides or it means that eventually it will be over ride?
jacques d.
2. Re: eu40 build 1188, re:find()
- Posted by bernie Sep 28, 2008
- 973 views
somewhere in developpement of euphoria 4.0 re:search() function was replaced by re:find() and I get a warning saying:
Warning ( builtin_chosen ): The built-in find() over rides the global/public find() in: c:\eu40\incl ude\std\regex.e
does it means that somewhere in the code re:find() as been over rides or it means that eventually it will be over ride?
jacques d.
Hi jacques:
That means that somewhere in your code you are including another function
called ' find ' and the parser thinks that you are trying to over-ride the
built-in.
What you have to do is either change the name of your function or use
namespace to tell the parser which function to use.
3. Re: eu40 build 1188, re:find()
- Posted by mattlewis (admin) Sep 28, 2008
- 925 views
somewhere in developpement of euphoria 4.0 re:search() function was replaced by re:find() and I get a warning saying:
Warning ( builtin_chosen ): The built-in find() over rides the global/public find() in: c:\eu40\incl ude\std\regex.e
does it means that somewhere in the code re:find() as been over rides or it means that eventually it will be over ride?
This is a change for 4.0 in the way that symbols are resolved. As the standard library grew, we had a choice of either coming up with synonyms for common functions, or reuse some built-in names. We chose to reuse the names.
But we also changed the way that the symbols were resolved. Basically, if there is a routine in another file with the same name as the built-in, you need to use a namespace in order to call that routine. One major reason for this is that to do otherwise would encourage bugs from including another file, and suddenly using the new routines instead of the built-ins. These routines weren't meant to replace the built-in routines.
If your intent is to actually replace the routines (maybe you want to add some extra logging, or something, every time the routine is called), then you can add the override qualifier to the routine.
The warning is just there to make sure that the coder knows what is being called. To avoid the warning, you can use the built-in "eu" namespace. Matt