bugGNU Octave - Bugs: bug #38653, matlab ... continuation sequence...

 
 

bug #38653: matlab ... continuation sequence not supported

Submitter:  John Donoghue <lostbard>
Submitted:  Wed 03 Apr 2013 01:43:29 AM UTC
   
 
Category:  Interpreter Severity:  2 - Minor
Priority:  2 Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  John Donoghue Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 15 Aug 2013 11:22:34 PM UTC, comment #10: 

I pushed your documentation patch (http://hg.savannah.gnu.org/hgweb/octave/rev/a654c1eccd29).

Rik <rik5>
Group administrator
Thu 15 Aug 2013 01:38:48 PM UTC, comment #9: 

patch for doc.

(file #28851)

Stefan Mahr <dac922>
Wed 14 Aug 2013 04:44:58 PM UTC, comment #8: 

I pushed a series of changesets to ignore everything after the ... marker, use ... instead of \ in Octave sources, and then to deprecate \ outside of double-quoted character strings.

Thanks.

http://hg.savannah.gnu.org/hgweb/octave/rev/7babcdb9bc13
http://hg.savannah.gnu.org/hgweb/octave/rev/8be8a65d3ca8
http://hg.savannah.gnu.org/hgweb/octave/rev/e993fa124b46

John W. Eaton <jwe>
Group administrator
Mon 12 Aug 2013 04:44:04 PM UTC, comment #7: 

Attached patch without deprecating \


(file #28821)

Stefan Mahr <dac922>
Mon 12 Aug 2013 04:05:14 PM UTC, comment #6: 

Attached patch fixes this bug and marks \ as deprecated (except for double quoted strings).

(file #28820)

Stefan Mahr <dac922>
Wed 19 Jun 2013 10:58:14 PM UTC, comment #5: 

It seems like Matlab is very obviously and explicitly turning everything after the continuation marker '...' into a comment.  We probably should do the same.

In the mean time, it is easy to workaround this and get the same behavior in Octave by using '... %' so that the line is a continuation and the comment character '%' causes Octave's parser to ignore the rest of the line.


S = 1 + 2 ... %anything after the ... is ignored
       - 2;


Rik <rik5>
Group administrator
Wed 03 Apr 2013 07:57:38 AM UTC, comment #4: 

such a behaviour isn't very new for Matlab, since Matlab7.0(R14) documentation has such a phrase:
"Three or more periods before the end of a line cause MATLAB to ignore the remaining text on the current line and continue the function on the next line. This effectively makes a comment out of anything on the current line that follows the three periods."

sergey plotnikov <nul0m>
Wed 03 Apr 2013 05:14:13 AM UTC, comment #3: 

OK, except that I think we'll want to handle "\.\.\." and "\\\n" differently now.  So maybe this is a good time to limit where these continuations can appear, and possibly deprecate the "\\\n" style.

John W. Eaton <jwe>
Group administrator
Wed 03 Apr 2013 05:08:20 AM UTC, comment #2: 

Or followed by whitespace or a comment.  I think we have allowed that for many years now.  If this isn't something new for Matlab, it's surprising that I've never seen a bug report about this until now.  In any case, it should be fairly easy to fix.


John W. Eaton <jwe>
Group administrator
Wed 03 Apr 2013 04:55:17 AM UTC, comment #1: 

I wonder if this is a rather new addition?  It seems that it used to be that '...' was only valid at the end of the line.  This is certainly what Octave currently implements.

Rik <rik5>
Group administrator
Wed 03 Apr 2013 01:43:29 AM UTC, original submission:  

Matlab '...' continuation sequence is not supported by the interpreter.

Test - this should be a valid command:


S = 1 + 2 ... anything after the ... is ignored
       - 2;


John Donoghue <lostbard>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28851:  continuation_lines_doc.diff added by dac922 (3KiB - text/x-patch)
file #28820:  continuationmarker.diff added by dac922 (34KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dac922 (Updated the item)
  • -email is unavailable- added by nul0m (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by lostbard (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-15 dac922 Attached File- Added continuation_lines_doc.diff, #28851
    2013-08-14 jwe StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-08-12 dac922 Attached File- Added continuationmarker_wo_deprecating_backslash.diff, #28821
    2013-08-12 dac922 Attached File- Added continuationmarker.diff, #28820
    2013-04-03 rik5 Severity3 - Normal 2 - Minor
        Priority5 - Normal 2
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code