patchGNU Octave - Patches: patch #8760, Extend parser to allow underscore...

 
 

patch #8760: Extend parser to allow underscore character in numbers

Submitter:  Rik <rik5>
Submitted:  Mon 05 Oct 2015 09:10:58 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  rik5 Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 10 Oct 2015 01:52:07 AM UTC, comment #1: 
Rik <rik5>
Group administrator
Mon 05 Oct 2015 09:10:58 PM UTC, original submission:  

Quoting from the NEWS file entry I wrote.


 ** The parser has been extended to accept, but ignore, underscore characters
    in numbers.  This facilitates writing more legible code by using '_' as
    a thousands separator or to group nibbles into bytes in hex constants.
    Examples: 1_000_000 == 1e6 or 0xDE_AD_BE_EF


This looks like a fun addition to Octave which further distinguishes it from Matlab.  I ran 'make check' and all tests pass so nothing appears to have been broken by this added functionality.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #35077:  _number.cset added by rik5 (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (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 logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-10 rik5 StatusReady For Test Done
        Open/ClosedOpen Closed
    2015-10-05 rik5 Attached File- Added _number.cset, #35077

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code