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

2008-02-28 Thread Artur Stuczynski
T. Guilleminot wites: 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. (...) Does anyone able to provide me a simple example to achieve this ? Thanks for any answer. Probably most

[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

2008-02-28 Thread L
> This seriously worries me, since I use threads extensively, and I mostly use call by value > parameters. Bye -- Luca I use CONST parameters wherever possible for strings.. so that: 1) if I ever port the code to a DLL it is safer (can cast pchar in) 2) const is a stricter contract 3) perfor

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

2008-02-28 Thread ik
Please don't think in PHP or C when you use Pascal... in C the compiler passes multiple times to be able to map between every line of code and locate things on other includes. The pascal's compiler does not include full units inside a big unit. it includes sub implementations: types.inc type M

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

2008-02-28 Thread T. Guilleminot
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

Re: [fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

2008-02-28 Thread Luca Olivetti
En/na L ha escrit: Found the problem using my brute force writeln('') skills. It is an issue with freepascal's stack or something to do with buggy threads methinks. As it is when you call lasterror within another procedure with local variables.. they are corrupted or something. Aha.. I chang