From maintainers-request at octave dot org Fri Mar 31 02:27:22 2006 Subject: Re: Bi variate to mono variate functions From: David Bateman To: "John W. Eaton" Cc: Anglade Pierre-Matthieu , maintainers@octave.org Date: Fri, 31 Mar 2006 10:22:57 +0200 John W. Eaton wrote: >On 30-Mar-2006, I wrote: > >| Inline functions are created using eval_string, which is given >| something like >| >| " at (ARGS) EXPRESSION" >| >| where EXPRESSION is the argument passed to inline, and ARGS are the >| variable names extracted from EXPRESSION. > >The answer appears to be yes, it would cause an incompatibility, >because functions constructed with inline don't seem to pick up >unbound variables from the parent context when they are constructed. >So we would need a way to limit this feature to actual anonymous >functions. > >jwe > > > > John, However, the Finline function indentifies all of the args and makes them part of the anonymous function handle. That is "inline('x+y+z')" is constructed using an anonymous function handle like " at (x,y,z) x +y + z". Whereas the case of a fixed value in a user function is more like " at (x,y) x + y + z", where in this case "z" is fixed. So in that can we can change make_anon_fcn_handle to resolve any arguments that are not in the leading parathesis at the time the function handle is defined. This should be a relatively easy change, but I don't like touching the parser so'd prefer you do it :-) Regards David -- David Bateman David dot Bateman at motorola dot com Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary