Document number | Nnnnn=yy-nnnn |
Date: | yyyy-mm-dd |
Project | Programming Language C++, Library Working Group |
Reply-to | this document |
- This
- Introduction
- Motivation and Scope
- Impact
- Design Decisions
- Technical Specifications
- Acknowledgements
- References
- Allow _ in numbers as non-breaking-zero-width-space (or otherwise ignored when gathering a number) 1_123.000_000_001 allowing them anywhere after a number token starts (0-9, -(?), +(?)). The _ are not retained as part of the number, and no printing will restore them other than custom user routines. Nearly all other languages now support this.
- ECMA SCRIPT proposal Has references to other languages' implementation.
- Adds convenience feature for coding numbers.
0x33_45_33_42
for example.
- All valid code previously written still behaves the same way.
- See ECMA Proprosal for more information.
- None Provided
- None known, no previous proposals have been mentioned.
- ECMA Script Proposal
- 'In case anyone is curious, the original digit separators proposal did use underscores: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2281.html
- A subsequent draft included a whole bunch of different options: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3499.html
- Before going back to underscore: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3661.html
- and finally the single quote we've had since C++14: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf'
Allow _ in numbers as non-breaking-zero-width-space (or otherwise ignored when gathering a number) 1_123.000_000_001 allowing them anywhere after a number token starts (0-9, -(?), +(?)). The _ are not retained as part of the number, and no printing will restore them other than custom user routines.
Nearly all other languages now support this.