From: Eric poirier <computer@algopharm.com>
Subject: Ada pointers to functions
Date: 1999/11/23
Date: 1999-11-23T00:00:00+00:00 [thread overview]
Message-ID: <3839DC14.74BE166C@algopharm.com> (raw)
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 ???
next reply other threads:[~1999-11-23 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-23 0:00 Eric poirier [this message]
1999-11-23 0:00 ` Ada pointers to functions Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox