From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-13 22:42:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!skynet.be!skynet.be!freenix!enst!enst.fr!not-for-mail From: "Robert C. Leif, Ph.D." Newsgroups: comp.lang.ada Subject: RE: Dimensionality Checking (Ada 20XX) Date: Thu, 13 Dec 2001 22:40:51 -0800 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1008312122 93110 137.194.161.2 (14 Dec 2001 06:42:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 14 Dec 2001 06:42:02 +0000 (UTC) To: Return-Path: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <9vb9m4$edl36$1@ID-25716.news.dfncis.de> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:17900 Date: 2001-12-13T22:40:51-08:00 From: Bob Leif To: Nick Roberts et al. "you can convert from one fixed point type to another, if their deltas and ranges are appropriately set, but these must be static." This is both true and unfortunate. I can understand that because of backwards compatibility and perhaps safety issues and compiler issues why the default for the compiler must remain static. However, I believe that a trap-door should be created, at least for type decimal, to permit the deltas and digits to be changed at run-time with the obvious proviso that they stay within the capabilities of the compiler. They could be specified as part of a generic. In the pre-calculator period, when I started in science, we used slide-rules. The exponent was calculated by summing the numerators and subtracting the sum of the denominators. It would be useful if a 1 Gigahertz computer had the capabilities of a simple, analog device that consisted of two pieces of wood and a transparent plastic slider. One other approach is to support a decimal floating point type. -----Original Message----- From: comp.lang.ada-admin@ada.eu.org [mailto:comp.lang.ada-admin@ada.eu.org]On Behalf Of Nick Roberts Sent: Thursday, December 13, 2001 2:23 PM To: comp.lang.ada@ada.eu.org Subject: Re: Dimensionality Checking (Ada 20XX) > Hah! That's a comment that O will touch upon further down. I meant: That's a comment that I will touch upon further down. And I never really did. My point simply is that you can indeed dynamically convert between feet, meters, inches, angstroms, parsecs, etc. within a single floating point type (usually) with impunity. You can't generally do this within one fixed point type; you can convert from one fixed point type to another, if their deltas and ranges are appropriately set, but these must be static. -- Nick