From: "gilrain" <john.thile@murraystate.edu>
Subject: Re: Trouble with s'fraction attribute.
Date: Sat, 28 Sep 2002 16:32:20 -0500
Date: 2002-09-28T16:32:20-05:00 [thread overview]
Message-ID: <t7pl9.68954$5M3.3116732@e3500-atl2.usenetserver.com> (raw)
In-Reply-To: mailman.1033244342.29257.comp.lang.ada@ada.eu.org
That's what I wanted. Thanks a lot!
John Thile
"David C. Hoos, Sr." wrote:
> You need to re-read the definition of the 'Fraction attribute.
> What you probably want is the 'Remainder attribute, of which
> an example is presented here:
>
> with ada.text_io, ada.float_text_io;
> use ada.text_io, ada.float_text_io;
> procedure remainder is
> number, int, fl : float;
> begin
> number := 3.141592654;
>
> int := float'truncation(number);
> fl := float'remainder(Number,int);
>
> put(int); new_line;
> put(fl);
> end remainder;
prev parent reply other threads:[~2002-09-28 21:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-28 20:01 Trouble with s'fraction attribute gilrain
2002-09-28 20:18 ` David C. Hoos, Sr.
2002-09-28 21:32 ` gilrain [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox