octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #48082] Cannot set breakpoint on files that ha


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #48082] Cannot set breakpoint on files that have invalid identifiers as names
Date: Fri, 3 Jun 2016 01:46:19 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #3, bug #48082 (project octave):

Thanks for the update, Emma.

Breakpoints wouldn't have helped here, because they are only encountered when
the code executes.  It doesn't execute at all if there is a syntax error,
because the whole file is parsed once when it starts running.

The current message isn't the clearest of errors, but it shows roughly the
offending line. It is one line off, because Octave allows a (...) expression
to span multiple lines, and it doesn't realise there was an error until it has
read "location" instead of ")", or perhaps "*" or something else that could
form part of an expression.

That off-by-one issue is one of the reasons why it says "near line ..."
instead of "in line ...".  I know gcc always used to report errors on the line
following a line with a missing ';', so this isn't unique to Octave.

Given that

  for n=1:length(TC(:,1)
                 * ones (1,1000))
      disp (n)
  end

is valid code, can you suggest a better error message?  Perhaps it could
mention how many levels of brackets are open, and where the most recent one
started.  I'm not sure how technically feasible that is.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48082>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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