bugGNU Octave - Bugs: bug #43815, ["ab" 99] produces...

 
 

bug #43815: ["ab" 99] produces single-quoted string 'abc'

Submitted by:  Rik <rik5>
Submitted on:  Sun 14 Dec 2014 12:59:00 AM UTC  
 
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: None
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 16 Dec 2014 04:35:42 AM UTC, comment #3:

I don't see much utility in the feature, and if someone comes along who needs it they can attempt to justify it, or pay to have it implemented.

I'm marking this as "Won't Fix" and closing the report.

Rik <rik5>
Project Administrator
Mon 15 Dec 2014 10:34:40 PM UTC, comment #2:

Rik, you are right that the only way a double-quoted string is supposed to be created is if all the parts that are concatenated are double-quoted strings. I think that's OK and probably doesn't need to change.

We have to allow concatenation of ASCII numeric values with single-quoted strings for Matlab compatibility.

I suppose we could disallow concatenation of ASCCI numeric values with double-quoted strings, since that won't cause trouble for Matlab compatibility. What do you think? Does anyone really need that feature?

John W. Eaton <jwe>
Project Administrator
Mon 15 Dec 2014 04:35:55 AM UTC, comment #1:

The relevant code is in pt-mat.cc in routine tree_matrix::rvalue1.

The default is a single-quoted string unless absolutely all strings are double quoted strings. See below.

It doesn't seem like this is particularly worth fixing.

Rik <rik5>
Project Administrator
Sun 14 Dec 2014 12:59:00 AM UTC, original submission:

This is just an oddity, and I'm not sure it has any relevance.

When concatenating a double-quoted string with a number the result is a single-quoted string. However, I suspect the rationale is that double-quoted string + ! double-quoted string = single-quoted string.

Thus, adding a single-quoted string, or a number counts as a non-double-quoted string and the result is therefore a single-quoted string.

Rik <rik5>
Project Administrator

 

(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 jwe (Posted a comment)
  • -unavailable- added by rik5 (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 16 Dec 2014 04:35:42 AM UTCrik5StatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1