comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Help: Truncating Decimal Types
Date: 1997/12/30
Date: 1997-12-30T00:00:00+00:00	[thread overview]
Message-ID: <dewar.883516681@merv> (raw)
In-Reply-To: 34A9138E.41C67EA6@swl.msd.ray.com


John asks

<<Does anyone have an easy way to extract the integer portion of a decimal
number - short of writing a function? Seems Ada should allow this (and
other attributes) for fixed and decimal types, but it doesn't without
first converting the value to decimal.
>>

	
This is trivial, just convert it to a decimal type whose delta is 1.0.
The default for such conversions is truncation. 





  reply	other threads:[~1997-12-30  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-30  0:00 Help: Truncating Decimal Types John J. Cupak Jr.
1997-12-30  0:00 ` Robert Dewar [this message]
1998-01-02  0:00   ` Peter Hermann
1998-01-02  0:00     ` Robert Dewar
replies disabled

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