CVS difference for ais/ai-00172.txt

Differences between 1.1 and version 1.2
Log of other versions for file ais/ai-00172.txt

--- ais/ai-00172.txt	1998/09/30 00:17:32	1.1
+++ ais/ai-00172.txt	1999/03/22 23:42:40	1.2
@@ -1,82 +1,41 @@
-!standard 10.02    (07)                               97-03-19  AI95-00172/01
+!standard 10.02    (07)                               99-03-21  AI95-00172/02
 !class confirmation 96-11-16
 !status work item 97-03-19
 !status received 96-11-16
 !priority High
 !difficulty Easy
-!subject Optional main subprogram?
-
-!summary 97-03-19
+!subject Which units can be designated as a main program?
 
-A main subprogram is optional -- the implementation must provide a way
-to create and run an active partition with no main subprogram.
+!summary 99-03-21
 
-A main subprogram must be a subprogram -- the implementation must report
-an error if the programmer requests that a package be used as the main
+A main subprogam is optional -- the implementation must provide
+a way to create and run an active partition with no main
 subprogram.
-
-!question 97-03-19
 
+A main subprogram must be a subprogram -- the implementation
+must report an error if the programmer somehow requests that
+a package or generic declaration be used as the main subprogram.
 
-!response 97-03-19
+An implementation, may, but need not, allow a subprogram declared
+within a package to serve as the main program.
 
-The ACVC test in question is:
+!question 99-03-21
 
--- 
-
---     Grant of Unlimited Rights
---
--- 00-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687 and
--- e U.S. Government obtained unlimited rights in the
--- tation contained herein.  Unlimited rights are 
--- 227-7013(a)(19).  By making this public release, 
--- ds to confer upon all recipients unlimited rights
--- by the Government.  These rights include rights to
--- ase or disclose the released technical data and
---  whole or in part, in any manner and for any purpose
--- ave or permit others to do so.
---
---            DISCLAIMER
---
--- ORMATION HEREIN RELEASED, MADE AVAILABLE OR
---   THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
--- ATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
--- ION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
---  OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
--- F SAID MATERIAL.
---*
--- 
---  CANNOT BE NAMED AS A MAIN PROGRAM.
+RM95-10.2(7) states:
 
--- 
--- D ORIGINAL TEST.
--- CEDURE TO KEEP PACKAGE BODIES LEGAL.
-
-PACKAGE LA1001F IS
-
-     PROCEDURE REQUIRE_BODY;
-
-END LA1001F;
-
-WITH REPORT; USE REPORT;
-PRAGMA ELABORATE(REPORT);
-PACKAGE BODY LA1001F IS
+"The user can optionally designate (in an implementation-defined
+manner) one subprogram as the main subprogram for the partition.
+A main program if specified, shall be a subprogram."
 
-     PROCEDURE REQUIRE_BODY IS
-     BEGIN
-       FAILED("PACKAGE WAS IMPROPERLY LINKED AND EXECUTED");
-     END;
+     Must there be a main subprogram?  (No.)
 
-BEGIN
-     TEST("LA1001F", "CHECK THAT A PACKAGE CANNOT BE NAMED AS A " &
-                      "MAIN PROGRAM");
+     Can a package serve as a main program?  (No.)
 
-     FAILED("PACKAGE WAS IMPROPERLY LINKED AND EXECUTED");
+!response 97-03-21
 
-     RESULT;
-END LA1001F;
+(See summary.)
 
-!appendix 96-11-16
+!appendix 99-03-21
 
 !section 10.2(07)
 !subject Optional main subprogram?
@@ -213,3 +172,57 @@
 - Bob
 
 ****************************************************************
+
+From: 	Robert Dewar
+Sent: 	Monday, March 22, 1999 9:32 AM
+
+it is worth mentioning the child unit case here (main program can be a child
+unit).
+
+****************************************************************
+
+From: 	Robert I. Eachus
+Sent: 	Monday, March 22, 1999 10:04 AM
+
+   Okay, will do, but I assume that the main program can only be a child of
+a library package or an instance of a generic subprogram due to other rules.
+
+                                        Robert I. Eachus
+
+****************************************************************
+
+From: 	Robert A Duff
+Sent: 	Monday, March 22, 1999 10:05 AM
+
+Several occurrences of "main program" (the Ada 83 term) should be "main
+subprogram", including one inside an RM quote.  (By the way, I suggest
+that when quoting from the RM, everybody cut and paste from the on-line
+version, to avoid typos.)
+
+> An implementation, may, but need not, allow a subprogram declared
+> within a package to serve as the main program.
+
+The original e-mail isn't included in the AI.  Did the questioner ask
+about this?  My memory is that the questioner asked *only* about the
+optionality.  It's not a good idea to answer questions that weren't
+asked, IMHO.  The ARG isn't in the business of publishing random
+interesting facts about the RM.
+
+- Bob
+
+****************************************************************
+
+From: 	Robert I. Eachus
+Sent: 	Monday, March 22, 1999 1:21 PM
+
+   The original question was about an ACVC test which attempted to create
+a executable without a main program.  I added the part about the subprogram
+within a package so that the AI didn't create more confusion than it
+eliminated, because it does answer the original question as worded. Saying
+that as the main program cannot be a package but can be part of one is even
+more confusing.
+
+                                        Robert I. Eachus
+
+****************************************************************
+
\ No newline at end of file

Questions? Ask the ACAA Technical Agent