From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 23 Jul 93 18:32:55 GMT From: psinntp!vitro.com!news@uunet.uu.net (Mikey) Subject: Re: Underscore ("_") in numeric literals Message-ID: <1993Jul23.183255.588@vitro.com> List-Id: In article <22lte3$nqm@nic.lth.se> dag@control.lth.se (Dag Bruck) writes: > >I would like to know to what extent people use undescore ("_") >characters in numeric literals, e.g., "100_000". Please send me your >opinions, etc. > >I would be particularly grateful if people could point me to Ada >source archives so I can make some simple statistical analysis of real >code, or if you would like to "grep" your own code and let me know >what you got. > >The reason is that the C++ standardization committees have received a >proposal to allow "_" in numeric literals. We are interested in some >sort of indication if people find this feature useful, and if it is >commonly used in languages that have it. If nobody uses "_" there is >no reason to add it to C++, and if it provides a significant >improvement in readability, C++ could use all the help it can get :-) > > > Thanks for your help, > > Dag Bruck > As an amateur astronomer, I write many programs that involve numerical analysis, orbit determination, orbit plots, etc., etc. I find that I use alot of numerical constants in double-precision that I believe would be much easier to update (when necessary - most astronomical constants don't change much :) ) and/or examine if I had the use of the "_". My Ada usage is limited to at work, where I am the company's Ada instructor. I personally like the "_" and would like to see it in C++. As for amount of usage; I would say about 10-20% of the time in product code, but almost 100% in my sample code and exercises for my Ada course material. Mike M. __________________________________________________________________ / Michael J. Mangieri Internet: mmangieri@vitro.com __ / Vitro Corporation Voice: (301) 231-3016 \ / MX-SP 4-2311 FAX: (301) 231-1233 \ / 14000 Georgia Ave. * Silver Spring, MD 20906-2972 "Everything should be made as simple as possible, but not simpler." - A. Einstein