bugGNU Octave - Bugs: bug #41923, genvarname produces variables with...

 
 

bug #41923: genvarname produces variables with leading underscores

Submitted by:  cyberdork33 <cyberdork33>
Submitted on:  Fri 21 Mar 2014 02:48:57 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 26 Mar 2014 08:33:38 PM UTC, comment #2:

Eugenio, I applied your change with an edited commit message and a few other small changes. The most important change is that we don't use TAB characters in our sources. Please configure your editor to insert spaces instead of literal TAB characters.

John W. Eaton <jwe>
Project Administrator
Sun 23 Mar 2014 08:08:45 PM UTC, comment #1:

I attached a patch to fix this compatibility issue. While working on it, I found out in Matlab's documentation [1] that when dealing with keywords genvarname should output a capitalised version with an x prepended, for instance "for" --> "xFor". I also addressed this.

[1] http://www.mathworks.it/it/help/matlab/ref/genvarname.html

Eugenio Gianniti <eg123>
Fri 21 Mar 2014 02:48:57 PM UTC, original submission:

Note that I have replicated this on GNU/Linux and OS X 10.8.

octave allows the use of variables names with a leading underscore. data created in octave and saved CAN be loaded in MATLAB, but when working with data, issues can arise where variables with leading underscores would be encountered.

MATLAB's genvarname uses 'x' as a leading character instead of '_'

in octave:

matlab (2013b at least) does not allow leading underscores in variable names.

cyberdork33 <cyberdork33>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31015:  genvarname.diff added by eg123 (3KiB - application/octet-stream)

 

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 eg123 (Updated the item)
  • -unavailable- added by cyberdork33 (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 26 Mar 2014 08:33:38 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 23 Mar 2014 07:40:00 PM UTCeg123Attached File-=>Added genvarname.diff, #31015

    Back to the top


    Powered by Savane 3.1-cleanup1