octave-maintainers
[Top][All Lists]
Advanced

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

Re: Crash with inline


From: John W. Eaton
Subject: Re: Crash with inline
Date: Thu, 16 Sep 2004 12:59:42 -0400

On 16-Sep-2004, Teemu Ikonen <address@hidden> wrote:

| Well, functions defined in the command line either by inline or function
| keyword would find undefined variables from the top-level environment (if
| they exist) and store their value. Something like:
| 
| > a = 1;
| > f = inline("x + a", "x");
| > f(1)
| ans = 2
| > a = pi;
| > f(1)
| ans = 2
| 
| Looks straightforward, but there might be all kinds of subtleties I'm not
| aware of...

I'm not sure it is a good idea to modify the scoping rules this way.
Why should inline functions or functions defined at the command line
behave differently from functions defined in a file?  Seems messy to
me.

jwe



reply via email to

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