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

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

[Octave-bug-tracker] [bug #46795] dbstop lacks much Matlab functionality


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #46795] dbstop lacks much Matlab functionality
Date: Mon, 18 Jan 2016 20:01:11 +0000
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38

Follow-up Comment #36, bug #46795 (project octave):

/I wish I could look over your shoulder/
Yeah I sometimes feel like the fool that can ask more questions than 20 Wise
Men can answer :-)

Looking back at comment #31 I see that I might have been a little more careful
about how to express my conclusions in a least ambiguous way; apologies for
that.

With "... when entering the condition in the GUI it works w/o double quotes" I
meant to say "....w/o double quoting" or as you say, "two levels of quoting". 
But...
turns out I messed that up too - only now I note the real issue.
In the GUI:

>> dbclear strread
>> dbstop in strread at 209 if format(2) == "f"
ans =  209
>> strread ("1 2 3", "%s")
warning: Error evaluating breakpoint condition:
    'f' undefined near line 1 column 14
stopped in
/home/philip/devel/octdev/oct410+VExTSdbs/../dev_VExTS/scripts/io/strread.m at
line 209
209:   if (strcmp (typeinfo (format), "sq_string"))
debug> format(2)
ans = s
debug> dbquit

>> dbclear strread
>> dbstop in strread at 209 if format(2) == '"f"'
ans =  209
>> strread ("1 2 3", "%s")
ans =
{
  [1,1] = 1
  [2,1] = 2
  [3,1] = 3
}
>>


...which shows that in the GUI double-quoting is equally necessary as in the
CLI to avoid misinterpreting/mis-parsing the "%":  
W/o double-quoting the breakpoint is triggered but not because the "if"
condition is met, rather because evaluating the "if" condition errors out
behind the curtains (i.e., in the parser?). 
That is surely something that unwary users will overlook and may provoke
questions in the ML/bug reports.

I also see this:

>> dbstop in strread at 209 if strcmp (format, '"%f"')
parse error:

  syntax error

>>> strcmp (format, '" ;
                       ^


Again parser issues, I suppose.

FWIW, Matlab doesn't accept the above dbstop construct at all, so maybe we
shouldn't bother too much.

As to the first verbatim block, I can't reproduce it now either, I also get
the warnings.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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