From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9e124b142a146211,start X-Google-Attributes: gid103376,public From: David Gressett Subject: Another Newbie question about interfacing to C Date: 2000/06/01 Message-ID: #1/1 X-Deja-AN: 630036294 Content-Transfer-Encoding: 7bit Organization: Posted via Supernews, http://www.supernews.com Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: comp.lang.ada X-Complaints-To: newsabuse@supernews.com Date: 2000-06-01T00:00:00+00:00 List-Id: 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.