redefining built-in routines.

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

On Wednesday 27 June 2001 03:15, Derek Parnell wrote:
> > Jiri:
> >     1.  allow re-definition of not just the built-in routines, but
> >         also of all previous declarations, possibly even constants (I
> >         know, Rob, you will never agree...) with mere warning.
>
> Now this sounds like a great idea. Why should RDS be the only dispenser of
> wisdom. For example, I can imagine somebody inventing a better abort()
> routine and I just might like to use that - without - modifing any of my
> existing code or included library files.

and Irv replied:

>Strangely enough, Euphoria handles just such a thing with no problem:
>  Warning: Built-in abort() redefined
>   Press Enter...

Well how about that! I can't recall reading about this feature of Euphoria.
But I went back to the docs and found this...

"You can override the definition of these built-in routines by defining your
own routine with the same name. You will get a suppressible warning if you
do this."

Not only can you redefine them, but you can change the parameters required
too.

Thanks Irv.

Now if only we could get the routine_id() of a built-in. That would be
something, it really would be something - to quote Paul McCartney.

>Change that from a built-in command to one in an include, however:
>  test.exu:3
>  attempt to redefine wait_key
>  function wait_key()
>                  ^

As you say, strange indeed.

-----------
cheers,
Derek Parnell
Senior Design Engineer
Global Technology Australasia Ltd
dparnell at glotec.com.au

---------------------




confidential information intended solely for the use of the individual or
entity to whom they are addressed. If you are not the intended recipient of
this message you are hereby notified that any use, dissemination,
distribution or reproduction of this message is prohibited. If you have
received this message in error please notify the sender immediately. Any
views expressed in this message are those of the individual sender and may
not necessarily reflect the views of Global Technology Australasia Limited.
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu