comp.lang.ada
 help / color / mirror / Atom feed
* warning: cannot return a local value by reference
@ 2004-06-02 22:11 k_leau
  2004-06-02 22:36 ` Georg Bauhaus
  2004-06-03  8:23 ` Martin Krischik
  0 siblings, 2 replies; 6+ messages in thread
From: k_leau @ 2004-06-02 22:11 UTC (permalink / raw)


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;

---------------------------------------
And a body "item_dbm_cls.adb" with:

package body item_dbm_cls is
    function new_item_dbm(it_dbm: item_dbm) return item_dbm is
        i_dbm: item_dbm;
    begin
        set_host_name(i_dbm.connection, host_name(it_dbm.connection));
    return i_dbm;
    end new_item_dbm;

end item_dbm_cls;

Why do I have this warning?
What mistake have I done? 

Thanks for any help.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-06-03 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2004-06-03 10:37     ` Martin Krischik

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