From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Main procedure inside a package?
Date: 08 May 2006 20:32:15 -0400
Date: 2006-05-08T20:32:15-04:00 [thread overview]
Message-ID: <wccu080qbqo.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: poka3e.sib.ln@hunter.axlog.fr
Jean-Pierre Rosen <rosen@adalog.fr> 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
next prev parent reply other threads:[~2006-05-09 0:32 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
2006-05-03 18:04 ` Frank J. Lhota
2006-05-09 0:32 ` Robert A Duff [this message]
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