Hello!
According to Fausto Iannuzzi:
I have read it's possible to call gcc functions from a gpc program or unit adding ";C" to functions' declaration. Is it also possible to call or use gpc functions, or generally gpc code, from a gcc program?
Yes: To call the Pascal procedure
Procedure foo ( Var Bar: Integer );
from a C program, use the header
extern void Foo ( int *bar );
Note that the First Character Of The Pascal Procedure Is Capitalized.
Compile the Pascal source as a Unit or Module to avoid a `main()' function to be generated from it.
Does gpc support operator overloading?
Yes:
Type Foo = <whatever>;
Operator + ( x, y: Foo ) = z: Foo;
begin (* Foo + Foo *) <calculate z out of x and y>; end (* Foo + Foo *);
Hope this helps,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]