comp.lang.ada
 help / color / mirror / Atom feed
* No sientific notation...
@ 2001-10-20 22:25 a98mican
  2001-10-21  0:05 ` tmoran
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: a98mican @ 2001-10-20 22:25 UTC (permalink / raw)


Hi!
I want to print out a float without the sientific notation.
Hence 1.000 E1 should be 10.000
How do I do this?

Thanks in advance!
/Michael Andersson




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No sientific notation...
  2001-10-20 22:25 No sientific notation a98mican
@ 2001-10-21  0:05 ` tmoran
  2001-10-21  5:04 ` Dale Stanbrough
  2001-10-22 16:26 ` Ted Dennison
  2 siblings, 0 replies; 6+ messages in thread
From: tmoran @ 2001-10-21  0:05 UTC (permalink / raw)


> I want to print out a float without the sientific notation.
> Hence 1.000 E1 should be 10.000
> How do I do this?
  In Put, Exp=>0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No sientific notation...
  2001-10-20 22:25 No sientific notation a98mican
  2001-10-21  0:05 ` tmoran
@ 2001-10-21  5:04 ` Dale Stanbrough
  2001-10-26 21:35   ` Stefan Skoglund
  2001-10-22 16:26 ` Ted Dennison
  2 siblings, 1 reply; 6+ messages in thread
From: Dale Stanbrough @ 2001-10-21  5:04 UTC (permalink / raw)


a98mican@ida.his.se wrote:


> I want to print out a float without the sientific notation.
> Hence 1.000 E1 should be 10.000
> How do I do this?

Put (My_Float, Fore => 4, Aft => 4, Exp => 0);

4 spaces beFORE the decimal point, 4 AFTer, no EXPonent.

Dale



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No sientific notation...
  2001-10-20 22:25 No sientific notation a98mican
  2001-10-21  0:05 ` tmoran
  2001-10-21  5:04 ` Dale Stanbrough
@ 2001-10-22 16:26 ` Ted Dennison
  2 siblings, 0 replies; 6+ messages in thread
From: Ted Dennison @ 2001-10-22 16:26 UTC (permalink / raw)


In article <3BD20954.D72177F5@ida.his.se>, a98mican@ida.his.se says...
>I want to print out a float without the sientific notation.
>Hence 1.000 E1 should be 10.000
>How do I do this?

My personal favorite way is to convert it to a fixed-point type (eg: Duration)
and take the 'image of that. Since you want the decimal point fixed on your
display, use a type that is meant for that.


Text_IO.Put_Line (Duration'image(Duration(Freds_Float)));

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No sientific notation...
  2001-10-21  5:04 ` Dale Stanbrough
@ 2001-10-26 21:35   ` Stefan Skoglund
  2001-10-26 22:03     ` James Rogers
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Skoglund @ 2001-10-26 21:35 UTC (permalink / raw)


Dale Stanbrough wrote:
> 
> Put (My_Float, Fore => 4, Aft => 4, Exp => 0);
> 
> 4 spaces beFORE the decimal point, 4 AFTer, no EXPonent.

Which is i think illegal either qualify all parameters or use positional
evaluation only !



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No sientific notation...
  2001-10-26 21:35   ` Stefan Skoglund
@ 2001-10-26 22:03     ` James Rogers
  0 siblings, 0 replies; 6+ messages in thread
From: James Rogers @ 2001-10-26 22:03 UTC (permalink / raw)


Stefan Skoglund wrote:
> 
> Dale Stanbrough wrote:
> >
> > Put (My_Float, Fore => 4, Aft => 4, Exp => 0);
> >
> > 4 spaces beFORE the decimal point, 4 AFTer, no EXPonent.
> 
> Which is i think illegal either qualify all parameters or use positional
> evaluation only !

No, this is quite legal. You can mix positional and named notation
as long as the positional parts are used first. In other words,
you cannot start off with named notation and end with positional.

Jim Rogers
Colorado Springs, Colorado USA



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-10-26 22:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-20 22:25 No sientific notation a98mican
2001-10-21  0:05 ` tmoran
2001-10-21  5:04 ` Dale Stanbrough
2001-10-26 21:35   ` Stefan Skoglund
2001-10-26 22:03     ` James Rogers
2001-10-22 16:26 ` Ted Dennison

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