comp.lang.ada
 help / color / mirror / Atom feed
* Another Newbie question about interfacing to C
@ 2000-06-01  0:00 David Gressett
  2000-06-01  0:00 ` gressett
  0 siblings, 1 reply; 3+ messages in thread
From: David Gressett @ 2000-06-01  0:00 UTC (permalink / raw)


I need to communucate with a C routine that takes an array of char *
as an argument, i.e., it is prototyped as

void someroutine(char *things[]);

The problem is that the component elements of  things are not
necessarily pointers to char;  they could be pointers to something
else that have been cast to pointers to char. someroutine has access
to information that tells it exactly which type is pointed to by the
elements of things[].

The original programmer of this routine used this technique to pass
arguments of arbitrary type to the routine someroutine. The types are
known at compile time, and their order in things[] is significant.The
number of elements in things[] is unlimited.

Is there a reasonable Ada way to pass arguments of arbitrary type to
an Ada routine? It need not look very C-ish. 




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

end of thread, other threads:[~2000-06-02  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-01  0:00 Another Newbie question about interfacing to C David Gressett
2000-06-01  0:00 ` gressett
2000-06-02  0:00   ` Marin D. Condic

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