comp.lang.ada
 help / color / mirror / Atom feed
From: stt@ada-uts
Subject: Re: Need help on float_io format
Date: Sun, 8-Nov-87 12:14:00 EST	[thread overview]
Date: Sun Nov  8 12:14:00 1987
Message-ID: <57900050@ada-uts> (raw)
In-Reply-To: 7785@steinmetz.steinmetz.UUCP


This is a feature, not a bug.  Ada believes in "scientific
notation" (not "Fortran notation").  As it says in LRM 14.3.8:14,

  If EXP has a value greater than zero, then the integer part
  to be output has a *single* digit, which is nonzero except
  for the value 0.0 of ITEM.

If you feel adventurous, you can PUT the number into a string,
and then fiddle around with the string (probably easiest if
you multiply by 10 first, so all you have to do
is prepend "0." and eliminate the existing decimal point).

If you feel very adventurous, you can write your own Float-to-string
conversion routine, and then output it using PUT of a string.

Tucker Taft
c/o Intermetrics
Cambridge, MA  02138

  reply	other threads:[~1987-11-08 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-11-06  4:38 Need help on float_io format nico nieh
1987-11-08 17:14 ` stt [this message]
1987-11-11 16:39 ` Alfred.Peterson
replies disabled

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