comp.lang.ada
 help / color / mirror / Atom feed
* Ada pointers to functions
@ 1999-11-23  0:00 Eric poirier
  1999-11-23  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 2+ messages in thread
From: Eric poirier @ 1999-11-23  0:00 UTC (permalink / 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 ???








^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-23  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-23  0:00 Ada pointers to functions Eric poirier
1999-11-23  0:00 ` Matthew Heaney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox