comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark D. McKinney" <mckmark@mail.us.net>
Subject: Re: Time_Span divide question
Date: 1997/05/15
Date: 1997-05-15T00:00:00+00:00	[thread overview]
Message-ID: <337BD41B.2FE1@mail.us.net> (raw)
In-Reply-To: 5lg555$rba3@castor.cca.rockwell.com


>  D1 := 0.495;
>  D2 := 0.500;
>  Put_Line ("Duration divide result: " & Integer'Image(Integer(D1/D2)));
   D1 / D2 = 0.990
   Integer(D1/D2) = 1
>
>  TS1 := To_Time_Span (D1);
>  TS2 := To_Time_Span (D2);
>  Put_Line ("Time_Span divide result: " & Integer'Image(TS1/TS2));

To_Time_Span(D1) = Integer(D1) = 0
To_Time_Span(D2) = Integer(D2) = 1
TS1 / TS2 = 0

Yes they should be different.

Careful where rounding occurs.




       reply	other threads:[~1997-05-15  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5lg555$rba3@castor.cca.rockwell.com>
1997-05-15  0:00 ` Mark D. McKinney [this message]
1997-05-16  0:00   ` Time_Span divide question Robert A Duff
1997-05-16  0:00   ` Stephen Leake
1997-05-19  0:00     ` Tucker Taft
1997-05-19  0:00       ` Robert Dewar
1997-05-21  0:00         ` Kevin Radke
1997-05-25  0:00           ` Robert Dewar
1997-05-27  0:00             ` Kevin Radke
1997-05-16  0:00 ` Tucker Taft
1997-05-19  0:00   ` Wayne
replies disabled

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