help-octave
[Top][All Lists]
Advanced

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

Re: functions not overwritten ?


From: Bill Denney
Subject: Re: functions not overwritten ?
Date: Thu, 2 Feb 2006 15:56:22 -0500 (EST)

I believe that, if you're wanting to do something like what you describe, you want to type clear <functionname> (i.e. clear foo) at the prompt between re-definitions. This is used to minimize the number of times that the parser must parse a function.

Bill

On Thu, 2 Feb 2006, Gerd Bürger wrote:

Hi,

the issue below still seems unresolved. Could anybody confirm the described error, or perhaps explain that it is a desired behavior.

Thanks,

        Gerd


I have the impression that since 2.9.4 function defintions are not over-writable (see example below). Is that change on purpose?

Regards,

        Gerd

------------
octave:1> function y = foo(x)
 > y = 2*x;
 > endfunction
octave:2> type foo
foo is a user-defined function:

function y = foo (x)
   y = 2 * x;
endfunction

octave:3> function y = foo(x)
 > y = 3*x;
 > endfunction
octave:4> type foo
foo is a user-defined function:

function y = foo (x)
   y = 2 * x;
endfunction
------------






-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------


--
"What people forget is that the only difference between Clippy and HAL9000
is that Clippy makes you want to kill yourself while HAL9000 does the job
for you."
  -- skaffen42, slashdot.org/article.pl?sid=03/08/15/1451223

reply via email to

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