comp.lang.ada
 help / color / mirror / Atom feed
From: rh@MITRE-BEDFORD.ARPA (Rich Hilliard - Mitre Software Center)
Subject: Restrictions on Ada Main Programs
Date: Mon, 1-Dec-86 11:01:53 EST	[thread overview]
Date: Mon Dec  1 11:01:53 1986
Message-ID: <8612011601.AA00457@mitre-bedford.ARPA> (raw)


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

             reply	other threads:[~1986-12-01 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-12-01 16:01 Rich Hilliard - Mitre Software Center [this message]
1986-12-06  6:03 ` Restrictions on Ada Main Programs Geoff Mendal
  -- 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