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,fcc68f44249afbd4 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 10 Jul 2007 01:27:00 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Translating C++ class types into Ada tagged types? References: <1184038007.190905.237050@x35g2000prf.googlegroups.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Tue, 10 Jul 2007 01:27:00 -0500 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 24.6.140.189 X-Trace: sv3-XbDhZGgwzHs2zEUaZYuOE9NLsX7ZbCz8ybbr86HccYpnFoNuLeaG4bYq4/x5AGqGjTMo44o18SCKxxe!/jqAZGCW9wsPt+zvzIT0xMeNYXGOc/kTwBY6v7xPAwKQScQwhJQISP7l5iKqvw1MGBGNZXF7+O0z!6HxdyEaaTJw72h9QEC7oxEuuZtcd X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Xref: g2news1.google.com comp.lang.ada:16448 Date: 2007-07-10T01:27:00-05:00 List-Id: You can force the user to give an initial age by package Animals is type Cat(Initial_Age : Positive) is tagged private; ... type Cat(Initial_Age : Positive) is tagged record Age : Positive := Initial_Age; end record; ... Frisky : Animals.Cat(Initial_Age => 0); If you want the initialization to be significantly more complicated than that, you can make type Cat controlled, with Initialize and Finalize procedures.