comp.lang.ada
 help / color / mirror / Atom feed
From: "k_leau" <k_leau@yahoo.com>
Subject: Re: warning: cannot return a local value by reference
Date: Thu, 3 Jun 2004 12:02:51 +0200
Date: 2004-06-03T12:02:57+02:00	[thread overview]
Message-ID: <40bef751$0$13933$636a15ce@news.free.fr> (raw)
In-Reply-To: 3595768.JMpgFWyRs6@linux1.krischik.com

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" <krischik@users.sourceforge.net> 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
>




  reply	other threads:[~2004-06-03 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02 22:11 warning: cannot return a local value by reference k_leau
2004-06-02 22:36 ` Georg Bauhaus
2004-06-02 22:49   ` k_leau
2004-06-03  8:23 ` Martin Krischik
2004-06-03 10:02   ` k_leau [this message]
2004-06-03 10:37     ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox