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: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #46795] dbstop lacks much Matlab functionality
Date: Sat, 23 Jan 2016 07:55:35 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:43.0) Gecko/20100101 Firefox/43.0

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

Philip, I've attached a screenshot of what I mean by "entered in the GUI". 
Entered through that dialog box, the expression works without extra quotes. 
I'm thinking of changing the help text from

*Conditions containing quotes (", ') or comment characters (#, %) should be
enclosed in quotes.  (This does not apply to conditions entered in the GUI.)*

to

*...in the dialog box.)*

Can you suggest a better wording?


On the command line, I'm limited by what the parser permits.  If, as the help
text suggests, the entire string is in quotes, then everything works:


>> dbstop in strread at 209 if 'any (format == "%f")'
ans = 209
>> dbstatus
breakpoint in strread at line 209 if any (format == "%f")


If it is not entirely in quotes, then the parser messes with things.  Look at
the error message in


>> ls -l ('"%f"')
ls: cannot access ('": No such file or directory


It treats the % as a comment and passes the three-character string ('" to the
command.

I can see four natural options (in decreasing order of my preference):

1. Use the current version with its limitations, relying on the documentation
to get people to use quotes.  (It is easier to remember the outer quotes and
get them in the right place if you think of it as quoting the whole condition,
which contains a quoted %f, rather than double-quoting the %f.)

2. Catch the exception thrown by the syntax error and print something more
informative.  If so, please suggest something.  Remember that we don't know
that the user typed a %, and if the 
% is absent, we don't know about the outer layer of quotes.

3. Get someone (jwe? Rik?) to fix the parser.

4. Only allow conditions to be entered using the dialog box.

5. Drop conditions entirely.

Which do you recommend?

FWIW, Matlab seems not lot like spaces in the condition; did you try the
condition with the spaces removed?  My guess is that it would be OK.

(file #36140)
    _______________________________________________________

Additional Item Attachment:

File name: dbstop_dialog.png              Size:169 KB


    _______________________________________________________

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]