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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!cica!tut.cis.ohio-state.edu!att!cbnewsl!arny From: arny@cbnewsl.ATT.COM (arny.b.engelson) Newsgroups: comp.lang.ada Subject: Re: Questions on Ada... Message-ID: <1067@cbnewsl.ATT.COM> Date: 11 Jul 89 19:41:26 GMT References: <3034@wpi.wpi.edu> <979@cbnewsl.ATT.COM> <4611@omepd.UUCP> Reply-To: arny@cbnewsl.ATT.COM (arny.b.engelson) Distribution: usa Organization: AT&T Bell Laboratories List-Id: In article <4611@omepd.UUCP> vladimir@inteloc.UUCP (Vladimir G. Ivanovic) writes: >In article <979@cbnewsl.ATT.COM> arny@cbnewsl.ATT.COM (arny.b.engelson) writes: >>There is more than one way to do this. One alternative is to use overlays. >>Simply declare an integer array of the proper length, use an address clause >>to overlay it at the location occupied by the structure you are copying >>from, and copy it to an integer array overlaid at the destination address. >>Another alternative is to use unchecked conversion from one type to another. >>Again, the Ada purists will be up in arms (overlays are officially erroneous), >>but the concept is very useful in some situations. >I agree about the utility, but disagree about the "officially erroneous" >comment attributed to Ada purists. In fact, I'd say there are entire classes >of problems that cannot be solved without using Unchecked_Conversion. Read my original posting more carefully. I did not say that Unchecked_ Conversion was erroneous. I said overlays are erroneous, and they do not use U_C. Read LRM 13.5:8. - Arny Engelson att!wayback!arny