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,FORGED_GMAIL_RCVD, FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,f5e42181cacdac63 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!o9g2000yqj.googlegroups.com!not-for-mail From: vldmr Newsgroups: comp.lang.ada Subject: Re: Variant record assignment fails discriminant check Date: Wed, 2 Sep 2009 08:09:23 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2e307dac-ae36-46a3-813f-09271215cca3@o9g2000yqj.googlegroups.com> References: <577dcd1b-5384-408f-abf5-440e6ebd651a@a7g2000yqo.googlegroups.com> <7614be09-c46f-44f8-a04b-090af7c1bf13@k13g2000prh.googlegroups.com> NNTP-Posting-Host: 205.175.225.24 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1251904163 29353 127.0.0.1 (2 Sep 2009 15:09:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 2 Sep 2009 15:09:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o9g2000yqj.googlegroups.com; posting-host=205.175.225.24; posting-account=e5APRAkAAAA7e6WNQ_sgu3KZK7Pj5eew User-Agent: G2/1.0 X-HTTP-Via: 1.1 secproxy04.rockwellcollins.com:8080 (IWSS) X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.6 (Debian-3.0.6-1),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8112 Date: 2009-09-02T08:09:23-07:00 List-Id: On Sep 2, 9:52=A0am, Adam Beneschan wrote: > On Sep 2, 7:25=A0am, vldmr wrote: > > Only if the actual parameter is mutable when you call the procedure. ... > > OK, so I'll bet your next question is: So how do I declare an object > to be unconstrained (mutable), but give its discriminant an initial > value other than the default (X520CommonName_teletexString)? > > =A0 =A0WXY : t_X520CommonName :=3D (choice_Id =3D> > X520CommonName_printableString, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 others =3D> <= >); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 -- Adam Oh, thank, make sense now. At least I see where my problem is. In my case WXY is actually declared as access to record, and is initialized using Unchecked_Conversion from external memory address, pointing to zero filled memory. Any advice how to declare an access to variant record to be mutable? Thank you, Vladimir