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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6abc2e20b7809de7,start X-Google-Attributes: gid103376,public From: Rush Kester Subject: Q: Access subprogram with class type parameters Date: 2000/03/08 Message-ID: <38C6F379.173A92AF@jhuapl.edu>#1/1 X-Deja-AN: 594885592 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@houston.jhuapl.edu X-Trace: houston.jhuapl.edu 952551751 1421 128.244.45.70 (8 Mar 2000 21:42:31 GMT) Organization: Johns Hopkins University Applied Physics Lab, Laurel, MD, USA Mime-Version: 1.0 NNTP-Posting-Date: 8 Mar 2000 21:42:31 GMT Newsgroups: comp.lang.ada Date: 2000-03-08T21:42:31+00:00 List-Id: This is my first attempt at using subprogram access types and class programming. Why doesn't Default_Get_Procedure match Get_Procedure in the following? with text_io; procedure test is type Values is tagged record null; end record; type Bool_Values is new Values with record Bool_Value : Boolean; end record; package bool_io is new text_io.enumeration_io(boolean); type Get_Procedure is access procedure ( File : in text_io.file_type; Value : out values'class); procedure Default_Get_Procedure( File : in text_io.file_type; Value : out Bool_Values) is begin bool_io.get(File, Value.Bool_Value); end Default_Get_Procedure; Get_Message : Get_Procedure := Default_Get_Procedure'Access; -- what's wrong? -- ... File : text_io.file_type; begin null; end test;