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,15d588b58ebcebac X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!news.in2p3.fr!in2p3.fr!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Initializers Date: Wed, 20 Dec 2006 08:59:12 +0100 Organization: Adalog Message-ID: <2gqame.9rt.ln@hunter.axlog.fr> References: <1166580131.054327.67090@80g2000cwy.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1166601663 17965 195.25.228.57 (20 Dec 2006 08:01:03 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 20 Dec 2006 08:01:03 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:7957 Date: 2006-12-20T08:59:12+01:00 List-Id: Larry Kilgallen a �crit : > In article <1166580131.054327.67090@80g2000cwy.googlegroups.com>, "markww" writes: > >> I'm trying to compare C++ to Ada. I'm looking specifically at Ada's >> lack of 'initializers'. I am guessing that this means there is no >> 'constructor' to Ada packages maybe? If that's the case - where do you >> initialize anything that needs setup when it comes into existence? > > For record components (the most common case I run into) take care of > it in the type declaration: > > FIELD_1 : INTEGER := 15; > FIELD_2 : STRING ( 1 .. 5 ) := "Omaha"; .. And for packages, put a sequence of statement in the body of the package: package body Blah is -- Declarations begin -- do any initialization here end Blah; -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr