bugGNU Octave - Bugs: bug #45510, multi-line string in octave...

 
 

bug #45510: multi-line string in octave requires a comma

Submitter:  None
Submitted:  Thu 09 Jul 2015 08:36:22 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Nasser M. Abbasi Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 04 Aug 2021 07:40:22 AM UTC, comment #4: 

Confirmed fixed with Octave 6.3 on Windows 10.

Closing report.

Markus Mützel <mmuetzel>
Group administrator
Wed 04 Aug 2021 06:03:01 AM UTC, comment #3: 

Using 6.1.0

No longer gives an error.

myString=['a'...
           'b'];


Anonymous
Thu 29 Dec 2016 10:14:35 PM UTC, comment #2: 

This issue is still present in Octave 4.2.0.

Hartmut <hardy>
Thu 09 Jul 2015 11:27:32 PM UTC, comment #1: 

Confirmed.  It's an odd corner case, but it should be fixed.  The problem goes away if the line continuation sequence '...' is set off from the text in any way.  This could mean adding a space before it, after it, or before the 'b' character.

All of the following work:


>> myString=['a' ...
'b'];
>> myString=['a'...
'b'];
>> myString=['a'...
 'b'];



Rik <rik5>
Group administrator
Thu 09 Jul 2015 08:36:22 PM UTC, original submission:  

This works in Matlab 2015a

myString=['a'...
           'b'];

But gives syntax error in Octave. 

parse error:
  syntax error

>>> 'b'];

    ^

Solution is to rewrite it by adding a comma as separator, as in

myString=['a',...
           'b'];

Now it works the same on Matlab and Octave. Since comma is not required in Matlab, this is an incompatibility issue.

Thanks,
--Nasser

Anonymous

 

(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 mmuetzel (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by None (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-04 mmuetzel StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2016-12-30 rik5 Release4.0.0 dev
    2015-07-09 rik5 Dependencies- bugs #45512 is dependent
    2015-07-09 rik5 StatusNone Confirmed
        Carbon-Copy- Added jwe

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code