comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Main procedure inside a package?
Date: Wed, 03 May 2006 18:12:11 +0200
Date: 2006-05-03T18:12:11+02:00	[thread overview]
Message-ID: <poka3e.sib.ln@hunter.axlog.fr> (raw)
In-Reply-To: <4458B284.60009@obry.net>

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



  reply	other threads:[~2006-05-03 16:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-03 12:40 Main procedure inside a package? wojtek
2006-05-03 13:39 ` Pascal Obry
2006-05-03 16:12   ` Jean-Pierre Rosen [this message]
2006-05-03 18:04     ` Frank J. Lhota
2006-05-09  0:32     ` Robert A Duff
2006-05-03 16:04 ` Martin Dowie
2006-05-03 16:47 ` Martin Krischik
2006-05-04 20:28   ` Wojtek
2006-05-03 19:41 ` Rolf
2006-05-11  8:34 ` Sathish Veluswamy
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox