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,cb42c112b28d82e2,start X-Google-Attributes: gid103376,public From: Eric poirier Subject: Ada pointers to functions Date: 1999/11/23 Message-ID: <3839DC14.74BE166C@algopharm.com>#1/1 X-Deja-AN: 551853390 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: carnaval.risq.qc.ca 943315991 132.208.15.126 (Mon, 22 Nov 1999 19:13:11 EST) Organization: Algorithme Pharma Inc MIME-Version: 1.0 NNTP-Posting-Date: Mon, 22 Nov 1999 19:13:11 EST Newsgroups: comp.lang.ada Date: 1999-11-23T00:00:00+00:00 List-Id: Hi !!! I know that there is some kind of pointers to function (see html reference language) But can I have an arrayr of pointers to functions something like : type Message_Procedure is access procedure (M : in String := "Error!"); procedure Default_Message_Procedure(M : in String); Give_Message : Message_Procedure := Default_Message_Procedure'Access; ... procedure Other_Procedure(M : in String); ... Give_Message := Other_Procedure'Access; ... Give_Message("File not found."); -- call with parameter (.all is optional) Give_Message.all; -- call with no parameters --> T_Ptr_Func is array (1..10) of Message_Procedure; <-- Is this legal ??? And how should I call one of these function-pointed in an array ???