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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fedeff7ff0412573 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-13 18:43:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!wn3feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: "Steve Doiel" Newsgroups: comp.lang.ada References: <3c8ff5df$1_7@news3.uncensored-news.com> Subject: Re: Question of data type X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1016073820 12.225.227.101 (Thu, 14 Mar 2002 02:43:40 GMT) NNTP-Posting-Date: Thu, 14 Mar 2002 02:43:40 GMT Organization: AT&T Broadband Date: Thu, 14 Mar 2002 02:43:40 GMT Xref: archiver1.google.com comp.lang.ada:21185 Date: 2002-03-14T02:43:40+00:00 List-Id: "Bigg K" wrote in message news:3c8ff5df$1_7@news3.uncensored-news.com... > I'm using Rational Apex 3.2.0b. (I don't have a choice in the matter.) > > My question: > > X is a record. If I want to assign X'Address to Y, what data type (integer, > float, etc) does Y have to be? > On the odd chance that you're coming to Ada from the C world, there are (at least) two possible answers for this question. The first answer: You say that X is a record, assume that record is of type T. If you want to have a data type that permits you to reference records of type T, you can define a new type: type TA is access all T; And then declare an access variable (similar to a typed pointer in C) taccess : TA; In order to permit the value in X to be referenced by an access type you must declare X as aliased: X : aliased T; Then you can do the assignment taccess := X'ACCESS; The second answer: If you want to get the equivalent to C's void pointer, the type of the pointer would be System.Address. That is P : System.Address; P := X'Address; I hope this helps, SteveD > Thanks for your help... > > ______________________________________________________________________ > Posted Via Uncensored-News.Com - Still Only $9.95 - http://www.uncensored-news.com > With NINE Servers In California And Texas - The Worlds Uncensored News Source >