Re: Eu 2.5 last minute suggestion
- Posted by Andy Serpa <ac at onehorseshy.com> Aug 27, 2004
- 492 views
Derek Parnell wrote: > > Andy Serpa wrote: > > > > I don't know if this is on your list, as I'm sure it has been brought up > > before. > My guess > > is that it would be easy to implement, so maybe it is not too late: the > > ability to > get > > & use routine_ids for built-in routines would be nice (and logical). > > I assume you are familiar with the workaround for this. > > }}} <eucode> > -- Make a local wrapper for the built-in. > function my_length(object x) > return length(x) > end function > > without warning > -- Make a routine with the same name as the built-in but > -- calls your wrapper. > function length(sequence x) > return my_length(x) > end function > with warning > > -- Testing -- > integer r_Length > r_Length = routine_id("length") > ? call_func(r_Length, {"A string"}) > </eucode> {{{ > Yeah, I've done something like that. I'd love to avoid such workarounds...