Mail Archives: djgpp/1998/03/01/22:17:10
Eran Rundstein <talrun AT actcom DOT co DOT il> wrote:
> Yes, But how do I call functions in C/C++ that sit in a Pascal file?
If your Pascal source reads
Procedure foo ( Var bar: Integer );
begin (* foo *)
writeln ( 'bar = ', bar );
end (* foo *);
then you can call it from C using
extern void Foo ( int *bar );
(* The First Letter Of Pascal Identifiers Is Capitalized
unless you specified otherwise with the `asmname' directive. *)
Of course, I am referring to GNU Pascal and GNU C. (What else?;-)
Hope this helps,
Peter
--
Peter Gerwinski, Essen, Germany, free physicist and programmer
Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - 1 Oct 1997
PGP key fingerprint: AC 6C 94 45 BE 28 A4 96 0E CC E9 12 47 25 82 75
Fight the SPAM! - http://maps.vix.com/
- Raw text -