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=-1.5 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,97439a4c062cf25d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.224.130.195 with SMTP id u3mr22398872qas.1.1368583927131; Tue, 14 May 2013 19:12:07 -0700 (PDT) Path: y6ni44354qax.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!citadel.nobulus.com!goblin3!goblin.stu.neva.ru!rt.uk.eu.org!feed.xsnews.nl!border-1.ams.xsnews.nl!post-feeder-02.xsnews.nl!frontend-F10-09.ams.news.kpn.nl From: "ldries46" Newsgroups: comp.lang.ada References: In-Reply-To: Subject: Re: User defined type conversion Date: Sun, 12 May 2013 09:04:36 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 Message-ID: <518f3dba$0$17523$703f8584@news.kpn.nl> Organization: KPN.com NNTP-Posting-Host: 77.168.179.107 X-Trace: 1368341946 news.kpn.nl 17523 77.168.179.107@kpn/77.168.179.107:50583 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit Date: 2013-05-12T09:04:36+02:00 List-Id: Is a variant record perhaps the solution for your problem. type Rec = (bit16, bit 8); type ABC is record Option : Rec; case Option when bit16 => A16 : Unsigned_16; B16 : Unsigned_16; when bit8 => A8 : Unsigned_8; B8 : Unsigned_8; C8 : Unsigned_8; D8 : Unsigned_8; end case; end record; It seems to me yhat changing Option will change the output of the record. L. Dries "Vin�cius Franchini" schreef in bericht news:c9c8b269-fb9e-4715-b48c-40047fff1658@googlegroups.com... Hi Folks, I have a problem with a type conversion. Hereby is what I'm trying to do: type AB is tagged record A : Unsigned_16; B : Unsigned_16; end record; type abcde is tagged record a: Unsigned_8; b: Unsigned_8; c: Unsigned_8; d: Unsigned_8; end record; X : AB; Y : abcd; X := Y; I'd like to do a direct conversion without creating a method for it.