help-octave
[Top][All Lists]
Advanced

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

Re: confusing "invalid use of end" message in octave-4.2.2


From: Nicholas Jankowski
Subject: Re: confusing "invalid use of end" message in octave-4.2.2
Date: Wed, 15 May 2019 09:25:49 -0500



On Tue, May 14, 2019 at 22:49 Sergei Steshenko via Help-octave <address@hidden> wrote:
Hello All,

here is a simple example of interactive session demonstrating the probblem:

"

octave:1> foo(end)
error: invalid use of end
octave:1> version
ans = 4.2.2
octave:2>
".


The truth is that 'foo' is undefined, but instead of stating this
clearly first Octave just prints "error: invalid use of end".


In real life I've stumbled upon this using 'plot' commands with some
undefined variables, and it was difficult to find out which exactly
variable was undefined.

--Sergei.



Interesting. Matlab returns an Undefined Function error.  Not sure why the parser picks end to complain about first.

reply via email to

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