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,cd9fd73b6a96d80d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-20 14:14:39 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stueberl.de!teaser.fr!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Beard, Frank Randolph CIV" Newsgroups: comp.lang.ada Subject: RE: Byte Swapping Constrained Data Types Date: Mon, 20 Oct 2003 17:01:53 -0400 Organization: Cuivre, Argent, Or Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1066683752 55230 80.67.180.195 (20 Oct 2003 21:02:32 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 20 Oct 2003 21:02:32 +0000 (UTC) To: Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Byte Swapping Constrained Data Types Thread-Index: AcOXQsKp3Nq4vGSGTmWDDqaiVsBvogACRPOw X-OriginalArrivalTime: 20 Oct 2003 21:01:53.0549 (UTC) FILETIME=[6394FBD0:01C3974D] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:1229 Date: 2003-10-20T17:01:53-04:00 -----Original Message----- From: Brian Barker [mailto:bbarker@ball.com] > Is Unchecked_Conversion an expensive operation? I will be converting a = good > bit of data over a periodic rate. Unchecked_Conversion is typically very fast. We've never had it impact our performance that we've noticed. You could create some timing tests just to check, but I wouldn't worry about it unless you are not meeting some reasonable performance criteria. > Also, will the compiler generate an error on the following line if the = size > of Terminal changes (say from 32 bits down to 16), but not > Intermediate_Type? The VAX Ada compiler would let you get away with differing sizes for Unchecked_Conversion. IIRC, you could convert a smaller size into a larger size, but not the other way around. Currently, I can only address the Aonix OA compiler, but that just = happens to be the one you're working with. I haven't tried it since OA v7.1.2a = and we're currently on OA v7.2.2. Assuming it still works the same, you = will get a compiler error that tells you they must be the same size. Someone else would have to tell you about GNAT, if you're interested. Frank