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: 103376,342dcd67e9ca73ee X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!gnilink.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Tue, 13 Sep 2005 11:33:31 +0200 From: Georg Bauhaus Organization: future apps GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050718 Debian/1.7.8-1sarge1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: tagged record child: override constructor? References: <1126591134.797303.318920@z14g2000cwz.googlegroups.com> In-Reply-To: <1126591134.797303.318920@z14g2000cwz.googlegroups.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <43269ce5$0$27544$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Date: 13 Sep 2005 11:33:25 MEST NNTP-Posting-Host: 42ef2297.newsread4.arcor-online.net X-Trace: DXC=:QOOG=;g=?O4mA>;52^R7K:ejgIfPPldDjW\KbG]kaMHFYk:AnJB[CM0EoDC;aOUADUUng9_FXZ=C>:=P9Ihe`BH@Z?dZ]MOidE X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4603 Date: 2005-09-13T11:33:25+02:00 List-Id: sean.gilbertson@gmail.com wrote: > I have a tagged record that is declared private, along with a > constructor function which returns an instance. I do this to enforce > the assignment of several required fields in the record, so if you know > how to do this another way, please let me know! Another option in addition to those already mentioned is to make the constructor function part of a nested construction package. This way the function is no longer a primitive operation of the type, and can be used for initialising the T-components of type derived from T. package P ... type T .... package Construction ... function make(...) return T ... end Construction; end P;