comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Decimal Floating point was RE: Information Systems Annex was RE: Dispatching and generics - language lawyer question
Date: 16 Aug 2002 08:26:04 -0700
Date: 2002-08-16T15:26:04+00:00	[thread overview]
Message-ID: <5ee5b646.0208160726.1f5a807f@posting.google.com> (raw)
In-Reply-To: mailman.1029448502.10542.comp.lang.ada@ada.eu.org

"Robert C. Leif" <rleif@rleif.com> wrote in message news:<mailman.1029448502.10542.comp.lang.ada@ada.eu.org>...
> From: Bob Leif
> To: Robert Dewar et al.
> 
> Since Ada has a function Ada.Unchecked_Conversion(S : 
> Source) return Target; she does permit a change in types. 

Yes, but with implementation defined effects!

In the case of the delta, I
> am proposing what I hope is much less extreme. I want to tell the
> compiler to accept a non-static number as a static number. Since this is
> not a type change but the change of a property of a type,

Once again Bob, this is compeltely incomprehensible. A
"number" is not static or non-static in Ada, an expression
is static or non-static. See the rules in 4.9, and please
try to express what you have in mind in a comprehensible
manner using Ada terminology. If you can't do that, perhaps
you can provide a complete, even if vague example, and we
might be able to figure out what you have in mind.

It seems that you have some confusion between exponent and
delta in your mind. They of course are quite different
concepts. 

It is of course possible to change the delta of a number,
and if you want variable scaling (perhaps that is what you
are talking about) the easiest way is just to use conversions.

Remember that fixed point in Ada is nothing more than scaled integer
arithmetic. You can always do scaling yourself.

So what I would propose you do to illustrate your idea (which may have
merit, I can't tell, I don't have the
foggiest idea what it is), is to first program it manually
doing the scaling yourself.

Then imagine some syntactic sugar to help you with the
scaling. and illustrate the desired sugar.





 I do not know
> how to do this? 
> 
> 
> -----Original Message-----
> From: comp.lang.ada-admin@ada.eu.org
> [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Robert Dewar
> Sent: Thursday, August 15, 2002 2:32 AM
> To: comp.lang.ada@ada.eu.org
> Subject: Re: Information Systems Annex was RE: Dispatching and generics
> - language lawyer question
> 
> "Robert C. Leif" <rleif@rleif.com> wrote in message
> news:<mailman.1029362042.2405.comp.lang.ada@ada.eu.org>...
> > Since virtually all of these decimal types will be 
> > intermediates in a
> > calculation, they could all have the same number of 
> > digits.
> 
> I really have no idea what the above means.
> 
> > The delta is
> > the problem.
> 
> Ditto
> 
> 
> > My crude workaround was to turn a non-static number into 
> > a static number by either a pragma or a method.
> 
> And double ditto here. Robert please explain at least vaguely what you
> have in mind. What on earth does it mean
> to turn a non-static number into a static number. You are
> certainly not using the term static in the Ada sense, or
> in any other common sense that I can guess.
> 
> > However, I would be happy
> > with a decimal floating type. 
> 
> This seems to be of very marginal use to me. Certainly not
> something to build into the language. If you need such a
> facility, just program it, that's easy enough, Yes, it
> will be inefficient, but no more or less inefficient than
> if it is put in the language, since obviously no machines
> support this at the hardware level, and all the compiler
> would do is call runtime routines anyway. So all you are
> talking about here is a minor bit of syntactic convenience
> for a feature with very limited use. Hardly a good candidate for a
> language extension.



  parent reply	other threads:[~2002-08-16 15:26 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24  5:33 Dispatching and generics - language lawyer question Grein, Christoph
2002-07-24 22:55 ` Robert A Duff
2002-07-25 15:46   ` Ben Brosgol
2002-07-29 20:38     ` Robert A Duff
2002-07-31 22:52       ` Dmitry A.Kazakov
2002-07-31 20:18         ` Robert A Duff
2002-08-02  1:15           ` Dmitry A.Kazakov
2002-08-01 16:30             ` Hyman Rosen
2002-08-02 23:42               ` Dmitry A.Kazakov
2002-08-02 15:49                 ` Hyman Rosen
2002-08-02 17:48                   ` Stephen Leake
2002-08-10  3:03                     ` Warren W. Gay VE3WWG
2002-08-05 11:15                   ` Dmitry A. Kazakov
2002-08-12 12:44                   ` Robert Dewar
2002-08-13  2:00                     ` Information Systems Annex was " Robert C. Leif
2002-08-13  8:17                       ` Robert Dewar
2002-08-13 23:53                         ` Information Systems Annex Robert C. Leif
2002-08-13 17:37                       ` Information Systems Annex was RE: Dispatching and generics - language lawyer question Keith Thompson
2002-08-13 23:53                         ` Robert C. Leif
2002-08-14  8:52                           ` Keith Thompson
2002-08-14 21:53                             ` Robert C. Leif
2002-08-15  9:31                               ` Robert Dewar
2002-08-15 21:54                                 ` Decimal Floating point was " Robert C. Leif
2002-08-16  6:26                                   ` Keith Thompson
2002-08-16 16:26                                     ` Robert C. Leif
2002-08-16 18:17                                       ` Keith Thompson
2002-08-16 15:26                                   ` Robert Dewar [this message]
2002-08-16 15:29                                   ` Robert Dewar
2002-08-15  9:26                           ` Robert Dewar
2002-08-15 16:17                             ` Darren New
2002-08-15 17:25                               ` David C. Hoos
2002-08-15 17:31                                 ` Darren New
2002-08-15 19:59                                 ` Frank J. Lhota
2002-08-15 17:39                               ` tmoran
2002-08-15 19:18                               ` Information Systems Annex was RE: Dispatching and generics - Larry Kilgallen
2002-08-15 18:41                                 ` Hyman Rosen
2002-08-16 15:49                                 ` Robert Dewar
2002-08-17  6:31                                   ` Simon Wright
2002-08-17 14:17                                     ` Robert Dewar
2002-08-15 21:54                             ` Decimal Floating types was RE: Information Systems Annex was RE: Dispatching and generics - language lawyer question Robert C. Leif
2002-08-16 15:21                               ` Robert Dewar
2002-08-16 16:15                                 ` Decimal Floating types Warren W. Gay VE3WWG
2002-08-17 10:52                                   ` Robert Dewar
2002-08-17 14:30                                     ` Warren W. Gay VE3WWG
2002-08-20  0:26                                       ` Robert Dewar
2002-08-20  2:35                                         ` SteveD
2002-08-22 18:15                                         ` Richard Riehle
2002-08-23  3:23                                           ` Robert Dewar
2002-08-16 15:47                             ` Information Systems Annex (usefulness of Decimal Floats) Warren W. Gay VE3WWG
2002-08-17 10:54                               ` Robert Dewar
2002-08-17 14:06                                 ` Warren W. Gay VE3WWG
2002-08-17 10:56                               ` Robert Dewar
2002-08-17 14:12                                 ` Warren W. Gay VE3WWG
2002-08-17 19:04                                 ` Robert C. Leif
2002-08-20  0:25                                   ` Robert Dewar
2002-08-16 15:38                           ` Information Systems Annex was RE: Dispatching and generics - language lawyer question Robert Dewar
2002-08-13 22:50           ` Randy Brukardt
2002-08-14  0:02             ` Robert A Duff
2002-07-25  0:40 ` 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