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: a07f3367d7,5f0f4bfb0467bb19 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!e9g2000vby.googlegroups.com!not-for-mail From: Julian Leyh Newsgroups: comp.lang.ada Subject: Re: Constructors with multiple inheritance Date: Thu, 6 Oct 2011 05:46:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <883198b7-af4f-4d66-94f1-67a34cf5c265@e9g2000vby.googlegroups.com> References: <11513972.2788.1317325228383.JavaMail.geo-discussion-forums@yqnv12> <1rj1mmkvwud1d.dzqoy4jhdfca$.dlg@40tude.net> <4976045.4489.1317352313370.JavaMail.geo-discussion-forums@yqjw35> <2pu3h5hqltxi$.ze4yrf1f2y8z.dlg@40tude.net> <23774546.1654.1317391464047.JavaMail.geo-discussion-forums@yqnk41> <1gnrks1djlaok.1k0r5f8z9ylfx.dlg@40tude.net> <24109204.1491.1317411738432.JavaMail.geo-discussion-forums@yqnv12> NNTP-Posting-Host: 194.156.172.86 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1317906007 871 127.0.0.1 (6 Oct 2011 13:00:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 6 Oct 2011 13:00:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e9g2000vby.googlegroups.com; posting-host=194.156.172.86; posting-account=4IMjSwoAAABghF4GBOy5ozdaZM8EkGwR User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HACRNKUSEL X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.187 Safari/535.1,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:22270 Date: 2011-10-06T05:46:08-07:00 List-Id: On 30 Sep., 21:42, "Rego, P." wrote: > > Because null cannot be dereferenced. If you want null allowed you have = to > > declare it as: > > =A0 =A0function Construct (Object_Reference : access Parent_Class) > > =A0 =A0 =A0 return Parent_Class_Ptr; > > or > > =A0 =A0function Construct (Object_Reference : Parent_Class_Ptr) > > =A0 =A0 =A0 return Parent_Class_Ptr; > > The first variant is a "method" of Parent_Class in the first argument. = The > > second variant is not. > > Maybe it's a good idea :-) . The first variant I guess could fit me very = well, and I did not think about it before. In this Case, you could turn it into a procedure with Object_Reference being an out parameter: procedure Construct (Object_Reference : out Parent_Class_Ptr); and then call it like you wanted: procedure Main is Obj : Parent_Class_Ptr; begin Obj.Construct; end Main;