comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@organon.com (Jon S Anthony)
Subject: Re: Integer truncation and other recipes
Date: 1996/06/04
Date: 1996-06-04T00:00:00+00:00	[thread overview]
Message-ID: <JSA.96Jun4154923@organon.com> (raw)
In-Reply-To: JSA.96May22221027@organon.com


In article <DsGC9A.4KD@bton.ac.uk> je@bton.ac.uk (John English) writes:

> : > In Ada, how do you convert from a real to an integer by truncation?
> : > That is, how would you convert a value such as 1.9 to 1?
> : Go to index and find entry:
> :   Truncation attribute 
> 
> Fine for floating point types, but you're out of luck if you want to truncate 
> *fixed point* types, for which the 'Truncation attribute isn't available...

First convert to floating point...

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





  reply	other threads:[~1996-06-04  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-22  0:00 Integer truncation and other recipes Paul Shedlarski
1996-05-23  0:00 ` Jon S Anthony
1996-06-04  0:00   ` Jon S Anthony [this message]
1996-06-05  0:00     ` Norman H. Cohen
1996-06-04  0:00   ` John English
1996-06-05  0:00   ` Robert I. Eachus
1996-06-08  0:00   ` Jon S Anthony
replies disabled

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