From: "Frank J. Lhota" <flhota@NOSPAM.ll.mit.edu>
Subject: Re: Main procedure inside a package?
Date: Wed, 03 May 2006 14:04:12 -0400
Date: 2006-05-03T14:04:12-04:00 [thread overview]
Message-ID: <Ug66g.1420$O5.84@llslave.llan.ll.mit.edu> (raw)
In-Reply-To: <poka3e.sib.ln@hunter.axlog.fr>
Jean-Pierre Rosen wrote:
> 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!
Even for Ada 83, a main program was not required to be a parameterless
library procedure. I recall seeing at least one validated Ada 83
compiler that also allowed the main program to be a library level
parameterless function returning an integer. The result of such a
function sets the return code of the resulting process.
For both Ada 83 and Ada 95, however, the only portable form for a main
program is a library parameterless library procedure.
next prev parent reply other threads:[~2006-05-03 18:04 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 [this message]
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