comparison NEWS @ 20623:e34692daf663

Extend parser to accept '_' in numbers. * NEWS: Announce change. * lex.ll: Define NUMBER to be a NUMREAL (real number) or NUMHEX (hex number). Define NUMREAL to begin with a digit (D) followed by more digits or an '_'. Define NUMHEX to begin with 0[xX], a hex digit (a-fA-F0-9), followed by '_' or more hex digits. Define EXPON to have a digit (D) followed by more digits or an '_'. * lex.ll (octave_base_lexer::handle_number): Strip out any underscores before processing number with sscanf. * parser.tst: Add tests for new behavior.
author Rik <rik@octave.org>
date Mon, 05 Oct 2015 14:05:58 -0700
parents b70cc4bd8109
children 7c0e10f035bd
comparison
equal deleted inserted replaced
20622:128414587af2 20623:e34692daf663
1 Summary of important user-visible changes for version 4.2: 1 Summary of important user-visible changes for version 4.2:
2 --------------------------------------------------------- 2 ---------------------------------------------------------
3
4 ** The parser has been extended to accept, but ignore, underscore characters
5 in numbers. This facilitates writing more legible code by using '_' as
6 a thousands separator or to group nibbles into bytes in hex constants.
7
8 Examples: 1_000_000 == 1e6 or 0xDE_AD_BE_EF
3 9
4 ** The default colormap is now set to 'viridis' which is also 10 ** The default colormap is now set to 'viridis' which is also
5 the default colormap in matplotlib. This new colormap fixes 11 the default colormap in matplotlib. This new colormap fixes
6 some of the main issues with the old default colormap 'jet' 12 some of the main issues with the old default colormap 'jet'
7 such as its bad 'luminance profile' and is also more similar 13 such as its bad 'luminance profile' and is also more similar