gpc questions_(re)
Mon, 25 Aug 1997 17:47:17 +0200 (MEST)
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 = ;
Operator + ( x, y: Foo ) = z: Foo;
begin (* Foo + Foo *)
;
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]
Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es