help-octave
[Top][All Lists]
Advanced

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

confusing error message in octave-3.2.4


From: Sergei Steshenko
Subject: confusing error message in octave-3.2.4
Date: Sat, 3 Sep 2011 06:56:11 -0700 (PDT)

Hello,

here is a short screen session:

"
octave:1> function foo  bar(end) endfunction
octave:2> foo()
error: invalid use of end
error: evaluating argument list element number 1
error: called from:
error:   foo at line 1, column 15
octave:2>    

".

First and foremost, 'bar' is simply undefined, but 'octave'
says nothing about it.

The above is a short testcase originating from a real script.

The 'bar' above in reality is not a function, but a vector,
I simply forgot to pass it through the function args, i.e.
it should be

function foo(bar) bar(end) endfunction
.


Is it the way it is supposed to be ? I.e. I think
'octave' should have first detected that 'bar' is undefined
- neither as function nor as data (i.e. vector in this case).

I.e. I suspect there is a name look up problem.


Thanks,
  Sergei.



reply via email to

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