bugGNU Octave - Bugs: bug #32598, Wishlist : More C-like multi-line...

 
 

bug #32598: Wishlist : More C-like multi-line block comments

Submitted by:  Rik <rik5>
Submitted on:  Fri 25 Feb 2011 07:43:08 PM UTC  
 
Category:  Interpreter Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 25 Apr 2018 03:36:51 PM UTC, comment #2:

Looking at some old bug reports that are still open...

Octave was changed at some point to only recognize the end of a block comment marker "#} or %}" if it appears as the beginning of a line (not counting space characters).

I think this is probably the safest thing to do for compatibility since it is possible that some working Matlab code could have

and if we changed the rules to recognize the first "%}" above as the end of the block comment, this valid Matlab code would fail in Octave.

So I think this report should be closed as "won't fix".

A related issue is that there could be some working Matlab code that looks like this:

and that will fail in Octave. I'll open a separate bug report about this issue.

John W. Eaton <jwe>
Project Administrator
Fri 11 Mar 2011 02:28:18 PM UTC, comment #1:

Currently
works as does:
For reference, neither works in Matlab. Suggestion: make the opening '#{' comment marker easier to use as suggested (if it's easy), but make the '%' comments be consistent with Matlab: force the '%}' to be on a line by itself.

Iain Murray <imurray>
Fri 25 Feb 2011 07:43:08 PM UTC, original submission:

Octave already supports multi-line block comments using #{/#} pairs. The current parser expects the keywords to be alone on a single line. It would be nice if this behavior could be extended to be closer to C-stytle /* */ commenting which can appear anywhere in the line. If this is at all tricky to implement then it is not worth it and this issue can be closed.

Currently parser example:

Desired parser example:

Rik <rik5>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

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

    Only project members can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-25 jwe StatusPostponed => Wont Fix
        Open/ClosedOpen => Closed
    2015-03-14 mtmiller Priority2 => 1 - Later
        StatusNone => Postponed
        Operating SystemGNU/Linux => Any
    2011-05-15 rik5 Dependencies- => bugs #33297 is dependent
    2011-02-25 rik5 Priority5 - Normal => 2

    Back to the top


    Powered by Savane 3.3