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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13703514e3723cbe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-17 07:45:05 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9l7qon$d78$1@nntp9.atl.mindspring.net> <9li279$mhm$1@slb2.atl.mindspring.net> Subject: Re: C-style 'union' in Ada? Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Fri, 17 Aug 2001 10:44:48 EDT Organization: http://www.newsranger.com Date: Fri, 17 Aug 2001 14:44:48 GMT Xref: archiver1.google.com comp.lang.ada:12050 Date: 2001-08-17T14:44:48+00:00 List-Id: In article <9li279$mhm$1@slb2.atl.mindspring.net>, Brian Catlin says... > >This is very similar to what I'm doing. I was trying to avoid unchecked >conversion. I had assumed that there would be a better way. Well, converting between types is pretty much what Unchecked_Conversion is in the language for. It may look a bit ugly and scary, but that's because the activity you are doing is *also* a bit ugly and scary (if sometimes nessecary). Consider it truth in advertising. :-) Note that since Unchecked_Conversion is a function, an assignment of the value will occur. That's why we usually perform it on pointers when the target data is large buffers. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com