TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Tom Moran <[log in to unmask]>
Thu, 11 Nov 2004 10:42:45 -0800
text/plain (12 lines)
In a message dated 11/10/2004 11:03:41 PM Pacific Standard Time,
[log in to unmask] writes:
I am writing a subroutine that has one parameter, another subroutine that I
want the second subroutine to execute.  Does anyone have any ideas how to
do this?

1) Use an access-to-subprogram parameter.
2) Use a generic with subprogram parameter.
3) Use an abstract tagged type with a subprogram,
     creating a non-abstract type with the particular
     subprogram you want to pass.