comp.lang.ada
 help / color / mirror / Atom feed
From: haven.umd.edu!news.umbc.edu!nobody@uunet.uu.net  (Mike Berman)
Subject: Re: Underscore ("_") in numeric literals
Date: 28 Jul 93 14:22:04 GMT	[thread overview]
Message-ID: <23622cINN1er@umbc4.umbc.edu> (raw)

dag@control.lth.se (Dag Bruck) writes:

| I have received about 20 replies, all in favour.  Is there nobody in
| the Ada community that thinks that it is a useless feature?  It seems
| to rarely used for the simple reason that people rarely type big
| numbers.

The use of embedded underscores in numeric literals is probably
statistically small, but the aid to understanding is invaluable.

The best application that I've seen is in engineering applications,
where large constant values (e.g. Pi) are defined via named numbers so that
they support any degree of desired accuracy. Mostly, these values are found
in standard engineering tables, where the digits are grouped (usually in
fours, I think). Duplicating this same grouping by using the underscores
makes it quite easy to verify the code against the reference.


-- 
Mike Berman
University of Maryland, Baltimore County     Fastrak Training, Inc.
berman@umbc.edu                              (301)924-0050
       The views represented in the above post are my own.

             reply	other threads:[~1993-07-28 14:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-07-28 14:22 Mike Berman [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-04 16:04 Underscore ("_") in numeric literals cis.ohio-state.edu!math.ohio-state.edu!sdd.hp.com!saimiri.primate.wisc.ed
1993-08-04 14:43 agate!howland.reston.ans.net!europa.eng.gtefsd.com!news.ans.net!newsgate.watson.ibm.com!yktnews.watson.ibm.com!ncohen
1993-07-28  5:43 Dag Bruck
1993-07-28  5:41 cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!agate!libra
1993-07-27 20:17 Robert Dewar
1993-07-27 15:33 Charles H. Sampson
1993-07-23 18:32 Mikey
1993-07-22 11:24 Dag Bruck
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox