comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: access to subprogram disciminants
Date: 1996/04/23
Date: 1996-04-23T00:00:00+00:00	[thread overview]
Message-ID: <4livr5$rq3@news1.delphi.com> (raw)

I want to declare an object with parameters, in particular, a
procedure parameter.  In Ada 83 I would have put the object in a
generic package and used the procedure as a parameter of the package.
In Ada 95 it appears I can make the object a record with a discriminant
of 'access to subprogram' type.  But when I try this, it always seems
to run into accessibility problems.
package definer is
  type a_s is access procedure(x:in out integer);
  type objects(s:a_s) is record ...
end definer;
with definer;
package user is
  procedure p(x:in out integer);
  object:objects(p'access);
..
1) How is this supposed to be done?
2) Other than generics or discriminants of records (or tasks),
what other ways are there of creating parameterized objects in Ada?




             reply	other threads:[~1996-04-23  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-23  0:00 tmoran [this message]
1996-04-24  0:00 ` access to subprogram disciminants Tucker Taft
  -- strict thread matches above, loose matches on Subject: below --
1996-04-24  0:00 tmoran
1996-04-25  0:00 ` Tucker Taft
1996-04-26  0:00 tmoran
1996-04-26  0:00 ` Robert I. Eachus
1996-04-26  0:00 ` Tucker Taft
1996-04-27  0:00 tmoran
replies disabled

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