Re: confusing "invalid use of end" message in octave-4.2.2
On 15/05/2019 17:25, Nicholas Jankowski
On Tue, May 14, 2019 at
22:49 Sergei Steshenko via Help-octave <[hidden email]>
here is a simple example of interactive session
demonstrating the probblem:
error: invalid use of end
ans = 4.2.2
The truth is that 'foo' is undefined, but instead of stating
clearly first Octave just prints "error: invalid use of
In real life I've stumbled upon this using 'plot' commands
undefined variables, and it was difficult to find out which
variable was undefined.
Interesting. Matlab returns an Undefined Function
error. Not sure why the parser picks end to complain about
Does Matlab at least mention the the function name is 'foo' ?
Anyway, to come to the conclusion that 'end' is used illegally
the parser has to first scan symbol table(s) and find out that
'foo' is not present in it/them. I.e. it shouldn't be a problem to
report 'foo' as unknown name - be it a variable or a function.