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-Thread: 103376,e6fd8711d3f26013 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!usenet-fr.net!grolier!194.74.65.66.MISMATCH!news-peer0-test!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: Martin Dowie Newsgroups: comp.lang.ada Subject: Re: on the use of "limited with" Date: Sun, 9 Oct 2005 07:42:57 +0000 (UTC) Organization: BT Openworld Message-ID: References: <1128779132.336469.160360@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: host86-131-222-95.range86-131.btcentralplus.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com 1128843777 12256 86.131.222.95 (9 Oct 2005 07:42:57 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Sun, 9 Oct 2005 07:42:57 +0000 (UTC) In-Reply-To: <1128779132.336469.160360@z14g2000cwz.googlegroups.com> X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) Xref: g2news1.google.com comp.lang.ada:5522 Date: 2005-10-09T07:42:57+00:00 List-Id: evangeli@cnam.fr wrote: > hello, > i recently downloaded gnat gpl and tested the new Ada 05 feature > "limited with" > here are two packages which defines two types: > > limited with q; > package p is > type tp_record is private; > type tp is access all tp_record; > function get_q(my_tp : in tp) return q.tq; Try ... return access q.tq_record; > private > type tp_record is record ... end record; > end p; > --=====================================-- > limited with p; > package q is > type tq_record is private; > type tq is access all tq_record; > function get_p(my_tq : in tq) return p.tp; Try ... return access p.tp_record; Cheers -- Martin