From: vldmr <vldmrrr@gmail.com>
Subject: Re: Variant record assignment fails discriminant check
Date: Wed, 2 Sep 2009 09:09:49 -0700 (PDT)
Date: 2009-09-02T09:09:49-07:00 [thread overview]
Message-ID: <8c7997fc-1696-42a4-a11a-847f279fc2f1@x37g2000yqj.googlegroups.com> (raw)
In-Reply-To: f211c2bb-1748-4d3c-ac00-8b4619f16ce5@m7g2000prd.googlegroups.com
On Sep 2, 10:33 am, Adam Beneschan <a...@irvine.com> wrote:
> However, you can get around this by embedding the variant record
> inside another record:
>
> type Rec is record
> Name : t_X520CommonName;
> end record;
> type Acc_Rec is access all Rec;
>
> Now, if X has type Acc_Rec, you can pass X.Name to your procedure, and
> it will be unconstrained (and therefore mutable).
>
> This is a workaround that I've used extensively in my own code, by the
> way.
>
> -- Adam
Yup, that works. I can not say I quite understand why, so for sure I
would not be able to invent that by myself.
Thank you very much!
Vladimir
next prev parent reply other threads:[~2009-09-02 16: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
2009-09-02 15:33 ` Adam Beneschan
2009-09-02 16:09 ` vldmr [this message]
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