[fpc-pascal] Externalization and inclusion of .PAS files (with GTK+) ?

T. Guilleminot tom at guilleminot.org
Thu Feb 28 12:22:35 CET 2008


Hi,

I'd like to simplify my programs by creating a short MAIN.PAS file and
several additional .PAS files called inside.
So I'd like to deport most of my code (procedures, functions...) to these
external .pas files and include them into the main.pas, a kind of
"include"-like in PHP.

I browsed the doc but between the "{$INCLUDE myfile1.pas}", the "uses"
clause (...) I'm quite lost and it has never worked for me yet.
As I code with GTK+ binding I also get GTK objects problem (eg : "unknown
object"...).

Does anyone able to provide me a simple example to achieve this ?
Thanks for any answer.
Tom





More information about the fpc-pascal mailing list