octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bi variate to mono variate functions


From: David Bateman
Subject: Re: Bi variate to mono variate functions
Date: Fri, 31 Mar 2006 10:22:57 +0200
User-agent: Mozilla Thunderbird 1.0.6-7.5.20060mdk (X11/20050322)

John W. Eaton wrote:

>On 30-Mar-2006, I wrote:
>
>| Inline functions are created using eval_string, which is given
>| something like
>| 
>|   "@(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 "@(x,y,z) x +y + z".
Whereas the case of a fixed value in a user function is more like
"@(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                                address@hidden
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]