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-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeder.wxs.nl!newsfeed01.sul.t-online.de!t-online.de!newsfeed01.chello.at!newsfeed02.chello.at!news.hispeed.ch.POSTED!not-for-mail Message-ID: <4558348.6BjxE5iVdR@linux1.krischik.com> From: Martin Krischik Subject: Re: Main procedure inside a package? Newsgroups: comp.lang.ada Date: Wed, 03 May 2006 18:47:32 +0200 References: <1146660038.801976.129790@g10g2000cwb.googlegroups.com> User-Agent: KNode/0.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@hispeed.ch Organization: hispeed.ch NNTP-Posting-Host: 80.218.119.160 (80.218.119.160) NNTP-Posting-Date: Wed, 03 May 2006 19:00:06 +0200 X-Trace: b54bc4458e196f57fd20523854 Xref: g2news2.google.com comp.lang.ada:4046 Date: 2006-05-03T18:47:32+02:00 List-Id: wojtek@power.com.pl wrote: > Is it possible for the main procedure to be inside a package? The > compiler is GNAT. No. The compiler would not know which procedure should be main because the main procedure can be called anything you like. However It can be a child procedure to a package. I use this feature quite often when I have packages just for one program. Works like this: package My_Package is end My_Package; procedure My_Package.My_Main is begin .... end My_Package.My_Main; Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com