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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,da8fecd51414cd54 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!news.cs.univ-paris8.fr!proxad.net!feeder2-1.proxad.net!news4-e.free.fr!not-for-mail From: "k_leau" Newsgroups: comp.lang.ada References: <40be5080$0$9181$626a14ce@news.free.fr> <3595768.JMpgFWyRs6@linux1.krischik.com> Subject: Re: warning: cannot return a local value by reference Date: Thu, 3 Jun 2004 12:02:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: <40bef751$0$13933$636a15ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 03 Jun 2004 12:02:57 MEST NNTP-Posting-Host: 81.56.189.156 X-Trace: 1086256977 news4-e.free.fr 13933 81.56.189.156:4781 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:1061 Date: 2004-06-03T12:02:57+02:00 List-Id: I think that's because Connection_type is a limited type and there was an error message telling me "completion of non limited type cannot be limited"...so I put limited in the public view and the error disappeared... I am just an Ada newbie...and I am far for understanding all the subtleties of the language yet. "Martin Krischik" wrote in message news:3595768.JMpgFWyRs6@linux1.krischik.com... > k_leau wrote: > > > Hello, > > > > I am new to Ada programming and I have the following problem: > > > > I am using the APQ binding for working with Postgresql. > > > > I have created the following spec "item_dbm_cls.ads" with the following: > > > > with item_cls, apq.postgresql.client; > > use item_cls, apq, apq.postgresql, apq.postgresql.client; > > > > package item_dbm_cls is > > type item_dbm is limited private; > > function new_item_dbm(it_dbm: item_dbm) return item_dbm; > > > > private > > type item_dbm is record > > it: item; > > connection: connection_type; > > end record; > > > > end item_dbm_cls; > > In addition to the other answer (the one suggesting a procedure) let me ask > you a question: > > The full private view of item_dbm is non limited so why did you make the > partial public view limited? > > With Regards > > Martin > -- > mailto://krischik@users.sourceforge.net > http://www.ada.krischik.com >