From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!MITRE-BEDFORD.ARPA!rh From: rh@MITRE-BEDFORD.ARPA (Rich Hilliard - Mitre Software Center) Newsgroups: comp.lang.ada Subject: Restrictions on Ada Main Programs Message-ID: <8612011601.AA00457@mitre-bedford.ARPA> Date: Mon, 1-Dec-86 11:01:53 EST Article-I.D.: mitre-be.8612011601.AA00457 Posted: Mon Dec 1 11:01:53 1986 Date-Received: Sun, 7-Dec-86 04:07:18 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The MITRE Corp., Bedford, MA List-Id: I always thought I understood Ada RM 10.1 (8): ... An implementation may impose certain requirements on the parameters and on the result, if any, of a main program (these requirements must be stated in Appendix F). In any case, every implementation is required to allow, at least, main programs that are parameterless procedures, and every main program must be a subprogram that is a library unit. In particular, I thought "parameters" referred to run-time parameters - those supplied in a call. Now I find an implementation that rejects generic instantiations of otherwise "parameterless" procedures owing to the presence of a generic formal parameter (see below) and citing this paragraph. Is this a legitimate interpretation or merely an implementor error? generic Default : Integer := 10; procedure Generic_Install; procedure Generic_Install is Site_Selectable_Parameter : Integer; begin Site_Selectable_Parameter := Default; end Generic_Install; with Generic_Install; procedure Install is new Generic_Install; -- ^^^^^^^ -- RM 10.1(8): instantiation install can not be a main program -- A parameterless integer function or procedure is required