comp.lang.ada
 help / color / mirror / Atom feed
From: vldmr <vldmrrr@gmail.com>
Subject: Re: Variant record assignment fails discriminant check
Date: Wed, 2 Sep 2009 08:09:23 -0700 (PDT)
Date: 2009-09-02T08:09:23-07:00	[thread overview]
Message-ID: <2e307dac-ae36-46a3-813f-09271215cca3@o9g2000yqj.googlegroups.com> (raw)
In-Reply-To: 7614be09-c46f-44f8-a04b-090af7c1bf13@k13g2000prh.googlegroups.com

On Sep 2, 9:52 am, Adam Beneschan <a...@irvine.com> wrote:
> On Sep 2, 7:25 am, vldmr <vldm...@gmail.com> 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)?
>
>    WXY : t_X520CommonName := (choice_Id =>
> X520CommonName_printableString,
>                               others => <>);
>
>                                           -- 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



  reply	other threads:[~2009-09-02 15:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 14:25 Variant record assignment fails discriminant check vldmr
2009-09-02 14:52 ` Adam Beneschan
2009-09-02 15:09   ` vldmr [this message]
2009-09-02 15:33     ` Adam Beneschan
2009-09-02 16:09       ` vldmr
2014-05-12  0:31 ` maniyazhagan
2014-05-12  0:32 ` maniyazhagan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox