comp.lang.ada
 help / color / mirror / Atom feed
From: Jeff Carter <jrcarter010@earthlink.net>
Subject: Re: TRUNCATE a FLOAT  [ 3,45 ]  ->  [ 3 ]
Date: 2000/02/06
Date: 2000-02-06T00:00:00+00:00	[thread overview]
Message-ID: <389CAE9E.19D5066F@earthlink.net> (raw)
In-Reply-To: 87ich2$pmk$1@bw107zhb.bluewin.ch

helder da silva wrote:
> 
> Anyone remembers how to truncate the first part of a float number :
> 
> FROM ( float ) :  3,45
> 
> TO ( integer )  :  3
> 
> I've got a blank on this one !
> 
> Thanks.

This must be a FAQ; we just had a thread on floating-point attributes.

Check out your ARM Annex K for the attribute 'Truncation. While you're
there, look at 'Floor and 'Ceiling, too.

Integer (Float'Trucation (3.45) ) = 3
-- 
Jeff Carter
"Hello! Smelly English K...niggets."
Monty Python & the Holy Grail




  parent reply	other threads:[~2000-02-06  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-06  0:00 TRUNCATE a FLOAT [ 3,45 ] -> [ 3 ] helder da silva
2000-02-06  0:00 ` David C. Hoos, Sr.
2000-02-06  0:00 ` Jeff Carter [this message]
2000-02-06  0:00   ` helder da silva
replies disabled

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