comp.lang.ada
 help / color / mirror / Atom feed
From: Mendal@SIERRA.STANFORD.EDU (Geoff Mendal)
Subject: Re: Restrictions on Ada Main Programs
Date: Sat, 6-Dec-86 01:03:20 EST	[thread overview]
Date: Sat Dec  6 01:03:20 1986
Message-ID: <12260541023.19.MENDAL@Sierra.Stanford.EDU> (raw)
In-Reply-To: 8612011601.AA00457@mitre-bedford.ARPA

The implementation is correct to reject your generic instantiation
as a main program.  A careful reading of LRM 10.1(8) shows that
only a SUBPROGRAM that is a library unit can be a main program.
While 10.1(2) allows generic instantations to be library units,
a subprogram is not the same as a generic instantiation.  Using the
syntagmas in 10.1(2) and the prose in 10.1(8) we find that only
a "proper" subprogram (not an instantiation) can be a main program.

However, I really like the attempt to use the instantiation.  Very
clever in any regard.

And now for the traditional leading question:

  The following compilation unit is compiled in the program library:
     generic
     procedure Main;
  Without deleting or explicitly "emptying" the program library, how
  can one compile a main program named "Main"?

gom (one of the "McKinsy brothers of Ada" as defined by EVB)
-------

  reply	other threads:[~1986-12-06  6:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-12-01 16:01 Restrictions on Ada Main Programs Rich Hilliard - Mitre Software Center
1986-12-06  6:03 ` Geoff Mendal [this message]
  -- strict thread matches above, loose matches on Subject: below --
1986-12-12 16:35 Rich Hilliard - Mitre Software Center
replies disabled

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