bugGNU Octave - Bugs: bug #58071, Addition of strings returns sum of...

 
 

bug #58071: Addition of strings returns sum of ascii codes

Submitter:  vishnu parammal <vishnuparammal>
Submitted:  Sat 28 Mar 2020 06:38:24 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  vishnu parammal Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 28 Mar 2020 07:32:34 PM UTC, comment #1: 

This is dependent on the existence of a 'string' class, which doesn't exist in Octave yet. That is basically bug #50855. When that class is created, it can overload all the operators that are useful for string objects.

Mike Miller <mtmiller>
Group Member
Sat 28 Mar 2020 06:38:24 PM UTC, original submission:  

The addition of strings returns sum of its ASCII codes.

octave:1> "a"+"b"
ans = 195
octave:2> "ab"+"cd"
ans =

   196   198

It would be better if it performs concatenation of those strings. If the present working is intentional, we could keep it strictly with sq_strings. This would maintain consistency with MATLAB and many other languages too.


vishnu parammal <vishnuparammal>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vishnuparammal (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-03-28 mtmiller Dependencies- Depends on bugs #50855
    2020-03-28 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code