[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: explanation what "error: can't redefine read-only symbol foo" means
Re: explanation what "error: can't redefine read-only symbol foo" means in detail
Tue, 06 Mar 2007 14:19:23 +0100
Thunderbird 184.108.40.206 (X11/20060921)
Andreas Romeyke wrote:
> I did not found a long description what the error message "error:
> can't redefine read-only symbol foo" means in detail.
> Please could anyone tell me an example which generates the error
> above? It seems to me that the function where Octave reports this
> error is similar to:
> function [bar] = foo(baz)
> if (..)
> But recursive calls should be allowed or I am wrong? I read the
> documentation but I did not found a detailled explanation about
> recursion or the error message above.
> Please could you tell me?
> Bye Andreas
function baz = foo (bar)
baz = bar + foo (--bar);
baz = 0;
in 2.9.9+ I get
ans = 15
So I don't see what the problem is. Can you give a full example...