RE: Conditional includes and generic routine names (was: Re: Euphoria fe
- Posted by <Christian.CUVIER at agriculture.gouv.fr> Dec 10, 2003
- 462 views
Pete Lomax wrote: > > > On 10 Dec 2003 16:00:41 +0100, Christian Cuvier > <Christian.CUVIER at agriculture.gouv.fr> wrote: > > >You don't need namespaces and still use generic names, but it's a bit > >complicated: > I assume that instead of the KISS principle (Keep It Simple, Simon), > this is the CUDDLE principle (Complicate Unnecessarily During > Development Laughs Eric)) LOL ! > > > >--in editexw.e: > >function openFile(sequence fname,sequence mode) > >end function > >dynAPI[openFile_]=routine_id(openFile) > > <snip> > >include editexw.e dynAPI_repository=append(dynAPI_repository,dynAPI) > >dynAPI=defdynAPI > Looks to me like you've just trashed all the routine-ids. Yep, should be an added statement (see above). There's an interesting "return call_proc..." statement too, remove the "return". The two main points are: - You can't include a conditional thing or from a routine, so that dynamic includes can be performed by other processes only; - Additionally, the various openFile() in the various included files should be global (so that the gathered routine_id's are usable) and renamed openFile__(), so as not to clash with editor.exw's openFile(). CChris > > Pete >