bugGNU Octave - Bugs: bug #34703, genvarname compability

 
 

bug #34703: genvarname compability

Submitted by:  Mikael <mandolin>
Submitted on:  Mon 31 Oct 2011 09:52:50 AM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.4.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 31 Oct 2011 03:54:11 PM UTC, comment #1:

Thanks for reporting this.

Octave is compatible with, but not a clone of, Matlab. We occasionally make different implementation choices from them. In this case, the philosophy is that we should replace the forbidden character in the original input rather than just delete it. The generated variable name is still valid, as genvarname() output is required to be. However, the Octave output is easier to read than when all the spaces have been removed and the everything is squished together.

Rik <rik5>
Project Administrator
Mon 31 Oct 2011 09:52:50 AM UTC, original submission:

With matlab when using genvarname it will remove space and octave will put an _ instead.

Example:

str = 'Hi hello 1 2 3';
varnam = genvarname(str)

result in matlab:
varnam =
HiHello123

result in octave
varnam = Hi_hello_1_2_3

Mikael <mandolin>

 

(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 rik5 (Posted a comment)
  • -unavailable- added by mandolin (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
    Mon 31 Oct 2011 03:54:11 PM UTCrik5StatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1