Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-07

Functions with variable number of parameters

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho

Hello,

While writing the apache pascal headers, I need to convert a c function like this:

void ap_allow_methods(request_rec *r, int reset, ...);

I know we can implement a variable number of paramaters in pascal using array of const type. But is that type compatible with a C function with a variable number of parameters?

I mean, will it work when calling a function written in c in a DLL?

If not, what should I do?

thanks,

Felipe Monteiro de Carvalho
Florian Klaempfl
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 10 lines
Hello, While writing the apache pascal headers, I need to convert a c function like this: void ap_allow_methods(request_rec *r, int reset, ...); I know we can implement a variable number of paramaters in pascal using array of const type. But is that type compatible with a C function with a variable number of parameters?

Use array of const with cdecl, it will work as expected.

I mean, will it work when calling a function written in c in a DLL?
If not, what should I do? thanks,