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,40e33eaeae684c37 X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: Help interfacing C Date: 2000/07/26 Message-ID: #1/1 X-Deja-AN: 651098060 References: <8ljlti$7u0$1@polaris.inta.es> X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 964639247 207.214.212.137 (Wed, 26 Jul 2000 12:20:47 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Wed, 26 Jul 2000 12:20:47 PDT Newsgroups: comp.lang.ada Date: 2000-07-26T00:00:00+00:00 List-Id: > int zzz_VaSend (zzz_mbox_cap mbox_c, int send_type, > int flag, int len, char *buf , char *va_list, ...); You could use overloading function f(some_params:some_type; a:another_type); function f(some_params:some_type; a,b:another_type); function f(some_params:some_type; a,b,c:another_type); That works well if you usually only have a few items in the variable parameter list. Or, since Ada allows easy creation of temporary arrays, you could do function f(some_params:some_type; list : array_type); and then call it with f(x, (1=>a)); -- perhaps replaced with something like the 1st f above. f(x, (a,b)); f(x, (a,b,c)); etc. Your function(s) will of course have to transmit their parameters appropriately to the C function. You will need separate pragma Imports for the C function for each number of parameters.