bugGNU Octave - Bugs: bug #39561, MATLAB compatibility reported...

 
 

bug #39561: MATLAB compatibility reported incorrectly

Submitted by:  None
Submitted on:  Wed 24 Jul 2013 02:28:10 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Tom OlinOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 06 Aug 2013 06:57:44 PM UTC, comment #4:

Thanks. I appreciate the support.

Tom Olin <tom_olin>
Tue 06 Aug 2013 06:52:23 PM UTC, comment #3:

Perfect, thanks for that example script. I wasn't seeing the warning with what I was testing, but I now see exactly what you report here with the provided function under version 3.6.4.

The good news is this has already been fixed in the development version of Octave. I see no warnings at all when calling the provided bug function with the matlab compatibility warning enabled.

Since the fix is likely in the parser, there is no easy way to backport this fix to 3.6.4. To get this fix you can either build a snapshot of the development version of Octave or wait until the next major release of Octave.

Mike Miller <mtmiller>
Project Administrator
Tue 06 Aug 2013 05:11:33 PM UTC, comment #2:

I cobbled up this file (bug.m) exhibiting the problem, based on some real code that originally produced the warnings. Some cases might be further reducible.

This is what it produces:

Perhaps examples 2, 3 and 4 fall under the rule that continuation markers are unnecessary inside parentheses? If so, then a tweak to the documentation could clarify that. If not, then it looks like a bug.

What about examples 1, 5 and 6?

In any case, the warning's reference to a nonexistent backslash is unnecessarily confusing and unhelpful.

Tom Olin <tom_olin>
Mon 05 Aug 2013 01:27:10 PM UTC, comment #1:

Thanks for your bug report. If you mean the following syntax

then I do not see a warning with '...' but I do with '\', as expected.

If, on the other hand, you mean line continuation inside of a double-quoted string, then this has been fixed in the development version of Octave. This has actually been deprecated as no longer supported in the development version of Octave. AIUI this is to be more compatible since it is an error with single-quoted strings.

http://hg.savannah.gnu.org/hgweb/octave/diff/531473481084/NEWS

Trying to do a '...' line continuation inside a quoted string in 3.6.4, I indeed get:

and with the development version of Octave:

Can you confirm this is the behavior that you were referring to?

Mike Miller <mtmiller>
Project Administrator
Wed 24 Jul 2013 02:28:10 PM UTC, original submission:

When checking for MATLAB compatibility using the 'Octave:matlab-incompatible' warning, Octave flags continuation lines using '...' as if they were using '\' instead. The exact error message is:

warning: potential Matlab compatibility problem: \ used as line continuation marker

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tom_olin (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 06 Aug 2013 06:52:23 PM UTCmtmillerStatusWorks For Me=>Fixed
      Open/ClosedOpen=>Closed
      Operating SystemMac OS=>Any
    Mon 05 Aug 2013 01:27:10 PM UTCmtmillerStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1