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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3bb692a2b3589bc3 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!c14g2000yqm.googlegroups.com!not-for-mail From: Chrono Newsgroups: comp.lang.ada Subject: Re: COM problem Date: Wed, 26 Aug 2009 11:07:41 -0700 (PDT) Organization: http://groups.google.com Message-ID: <61b5f53d-51f5-4f8e-8586-b176a75bb139@c14g2000yqm.googlegroups.com> References: <1e5e4fd4-5de0-46e6-8c58-d2c7a6fb222a@k6g2000yqn.googlegroups.com> NNTP-Posting-Host: 201.7.145.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1251310061 9936 127.0.0.1 (26 Aug 2009 18:07:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 26 Aug 2009 18:07:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c14g2000yqm.googlegroups.com; posting-host=201.7.145.1; posting-account=n9Sa1woAAACZc_iwSjaEkj9Lnt-XVrSr User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8001 Date: 2009-08-26T11:07:41-07:00 List-Id: On 25 ago, 22:50, "Steve D" wrote: > "Pablo" wrote in message > > news:1e5e4fd4-5de0-46e6-8c58-d2c7a6fb222a@k6g2000yqn.googlegroups.com... > > >I have a field type Field_Type whose record values I have to set into > > a variant variable. How do I do this? > > If you're using GNATCOM (for example): > > float_value : float := 42.0; > variant_value : GNATCOM.Types.VARIANT; > ... > value := GNATCOM.VARIANT.To_VARIANT( float_value ); > > You can find GNATCOM at:http://sourceforge.net/projects/gnavi/files/ > > Regards, > Steve You understood what I meant... but my problem is that my variable is a record. Say us, I have a Field_Type defined as a record like type Field_Type is record Truth : GNATCOM.Types.VARIANT_BOOL; Determination : Interfaces.C.double; end record; so in my code I set the values like Field : Field_Type := (Truth => 1, Determination => 5.323423423); Then I have to convert this Field_Type Field into a Variant type My_Variant : aliased GNATCOM.Types.VARIANT; *** Due to I have to execute a method Method (Parameter_Doesnotmatter, My_Variant'access); *** So this is the problem... would you please help me? Thanks so much.