From: westley@aardvark.uucp (Terry J. Westley)
Subject: 'small not power of 2 (Was: language support for fixed-point arithmetic)
Date: 23 Mar 90 14:43:15 GMT [thread overview]
Message-ID: <1990Mar23.144315.499@planck.uucp> (raw)
In-Reply-To: EACHUS.90Mar21171727@aries.aries.mitre.org
In article <EACHUS.90Mar21171727@aries.aries.mitre.org> eachus@aries.mitre.org (Robert I. Eachus) writes:
> Huh? Why must 'SMALL be a power of two? By default 'SMALL is a
>power of two, but this is an arbitrary choice which can be overridden
>by a "for foo'SMALL use ..." declaration.
Since confession is supposed to be good, I confess that this capability
had never penetrated the fog in my brain. I know that I have read it
in Booch (_Software_Engineering_with_Ada_) and in the RM, but it never
clicked. Thanks.
I tried your types METERS and NAUTICAL_MILES example from the referenced
article. The compiler I used (Verdix 6.0 on Sun 4) generated code for
the conversion functions. The compiler crashed when I used higher
levels of optimization. (Note to anyone from Verdix who might be
reading this: I sent a report in today with the details.)
Unchecked_Conversion, of course, works.
Do you know of any compilers that are "smart" enough to detect this
situation?
Terry J. Westley
Arvin/Calspan Advanced Technology Center
P.O. Box 400, Buffalo, NY 14225
acsu.buffalo.edu!planck!hercules!westley
next prev parent reply other threads:[~1990-03-23 14:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-03-15 17:42 language support for fixed-point arithmetic Kurt Baudendistel
1990-03-15 23:03 ` Bob Robison
1990-03-19 17:55 ` Terry J. Westley
1990-03-21 22:17 ` Robert I. Eachus
1990-03-23 14:43 ` Terry J. Westley [this message]
1990-03-26 18:36 ` C. D. Covington
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox