Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!ucbvax!decwrl!purdue!rjh From: rjh@cs.purdue.EDU (Bob Hathaway) Newsgroups: comp.lang.ada Subject: Re: Procedure types and dynamic binding Message-ID: <5806@medusa.cs.purdue.edu> Date: 10 Jan 89 03:06:07 GMT References: <5796@medusa.cs.purdue.edu> <4046@hubcap.UUCP> <5804@medusa.cs.purdue.edu> Sender: news@cs.purdue.EDU Reply-To: rjh@cs.purdue.edu (Bob Hathaway) Organization: Department of Computer Science, Purdue University Lines: 16 Another more direct way to parameterize a change operation is to use a procedural variable as a parameter. Such as: generic type ELEMENT_TYPE is private; package ... type PRINT_PROCEDURE is procedure (ELEMENT : in ELEMENT_TYPE); procedure CHANGE_PRINT_OPERATION (PRINT_OPERATION : in PRINT_PROCEDURE); This allows dynamic specification of statically checked print procedures per instance while the previous example assumed the user knew all allowable procedures during instantiation. Bob Hathaway rjh@purdue.edu