help-octave
[Top][All Lists]
Advanced

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

Re: efficient function parameter copying?


From: John W. Eaton
Subject: Re: efficient function parameter copying?
Date: Fri, 10 Sep 1999 13:09:15 -0500 (CDT)

On 10-Sep-1999, Michael Pronath <address@hidden> wrote:

| yes, that's what I thought, too.  But in your example definitions, it's
| function y=f(x), while I meant function x=f(x).  And you call it with
| w=f(z), while I meant z=f(z).  This is an important difference, as in
| my case, the formal input and output parameters are the same plus the
| actual input and output parameters are the same.  Of course, my function
| performs changes on x, else it would be without any effect.

OK, I understand what you are trying to accomplish now.

| This optimization could be simply done by taking the names of the
| actual parameters and the formal parameters of a function call and
| searching for "matching pairs".  This could make a true "call by
| reference" possible.

If it is that simple, then perhaps you'd like to submit a patch!  :-)

jwe



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

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