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!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Main procedure inside a package? Date: Wed, 03 May 2006 18:12:11 +0200 Organization: Adalog Message-ID: References: <1146660038.801976.129790@g10g2000cwb.googlegroups.com> <4458B284.60009@obry.net> 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 1146675670 3179 195.25.228.57 (3 May 2006 17:01:10 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 3 May 2006 17:01:10 +0000 (UTC) User-Agent: Thunderbird 1.5 (Windows/20051201) In-Reply-To: <4458B284.60009@obry.net> Xref: g2news2.google.com comp.lang.ada:4047 Date: 2006-05-03T18:12:11+02:00 List-Id: 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. How to define the main subprogram (including the case where it is not a library procedure) is implementation defined, i.e. RTFM! -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr