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,ed1ad27c78470510 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Main procedure inside a package? Date: 08 May 2006 20:32:15 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1146660038.801976.129790@g10g2000cwb.googlegroups.com> <4458B284.60009@obry.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls4.std.com 1147134735 26507 192.74.137.71 (9 May 2006 00:32:15 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 9 May 2006 00:32:15 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news2.google.com comp.lang.ada:4162 Date: 2006-05-08T20:32:15-04:00 List-Id: Jean-Pierre Rosen writes: > Pascal Obry a �crit : > > wojtek@power.com.pl a �crit : > >> Is it possible for the main procedure to be inside a package? The > >> compiler is GNAT. > > No, the main procedure must be a library level procedure. I think that > > there is another restriction: this procedure should not have parameters > > (I have no easy way to check that right now). > > Anything can be a main subprogram (the restriction was for 83), however > only parameterless library procedures are guaranteed to be portable: > > LRM 10.2(29): > An implementation may restrict the kinds of subprograms it supports as > main subprograms. However, an implementation is required to support all > main subprograms that are public parameterless library procedures. True, but most Ada implementations support only the minimum required, here -- no main functions, no parameters on main procedures, and no main procedures nested in packages. - Bob