Board index » delphi » Pascal <-> C communication

Pascal <-> C communication

Hey out there!

I would appreciate it if anyone could help me with this:
I need to integrate Pascal and C code under HP-UX, the alternative is to
rewrite the Pascal code to C.
'Named pipes' has been suggested as a possible comuunication channel. Is
this an efficient tool regarding prcosessing speed, compared to a
function call (which is the alternative if the Pacal code is rewritten
to C)?

Best regards,

Marius Five Aarset,
marius.aar...@noina.abb.no

 

Re:Pascal <-> C communication


In article <355AF1B3.A5B44...@noina.abb.no>, marius.aar...@noina.abb.no
says...

Quote

>Hey out there!

>I would appreciate it if anyone could help me with this:
>I need to integrate Pascal and C code under HP-UX, the alternative is to
>rewrite the Pascal code to C.
>'Named pipes' has been suggested as a possible comuunication channel. Is
>this an efficient tool regarding prcosessing speed, compared to a
>function call (which is the alternative if the Pacal code is rewritten
>to C)?

>Best regards,

>Marius Five Aarset,
>marius.aar...@noina.abb.no

If you look closely I suspect you will find that they have either
the same calling convention, or wrappers have been made available
to accomplish calling across the languages.
If not, it is a fairly easy proposition to make your own. You
can take a function called, say, "myfunc", write a simple
wrapper in assembly, and have that call the actual function
at "_myfunc". The wrapper rearranges the parameters on the
stack.

Of course, it involves work ! Both to do, and to research what
to do. But the work is *far* less than doing a full retranslation,
and to a low grade language at that (there I go again :).
But I have been fairly amazed how hard folks will work to avoid
learning something.

                                         [sam]

Other Threads