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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: warning: cannot return a local value by reference Date: Thu, 03 Jun 2004 10:23:28 +0200 Organization: AdaCL Message-ID: <3595768.JMpgFWyRs6@linux1.krischik.com> References: <40be5080$0$9181$626a14ce@news.free.fr> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1086252800 01 8089 KuA9GCblGOPGSJev 040603 08:53:20 X-Complaints-To: usenet-abuse@t-online.de X-ID: ZZQAWsZBrepCvDdn1R1dQqwPMnULhPCy2N-AHrO6GvDc7dwE0TwowN User-Agent: KNode/0.7.7 Xref: g2news1.google.com comp.lang.ada:1059 Date: 2004-06-03T10:23:28+02:00 List-Id: 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