Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-02

library initialization finalization syntax

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bernd Kreuss

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

library libtest;
{$mode objfpc}{$H+}
uses
  Windows;
initialization
  MessageBox(0, 'loaded', 'library', 0);
finalization
  MessageBox(0, 'unloading', 'library', 0);
end.

This will compile and will pop up the messageboxes (at least on windows it does) but the quick syntax check will complain and also <ctrl>+<space> and <shift>+<space> to get autocompletion and calltips won't work anymore inside these sections and JCF code formatting will also fail.

Is the usage of these sections in libraries an undocumented feature that only works by accident or should I try to find a fix for the syntax check when I have some time?

Bernd

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLgALrxT6R4jlFoh0RApw3AKDObqa3If1t99WUGghoz9jtzb0OeQCg2Wbj WVa35suVp/TQY3Q5vWmWaas=
=TOBV
-----END PGP SIGNATURE-----

Thierry Coq
to Bernd Kreuss

Libraries are standard features, also available in Delphi. I use them regularly.

Best regards,
Thierry

Bernd Kreuss wrote 46 lines
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 library libtest; {$mode objfpc}{$H+} uses Windows; initialization MessageBox(0, 'loaded', 'library', 0); finalization MessageBox(0, 'unloading', 'library', 0); end. This will compile and will pop up the messageboxes (at least on windows it does) but the quick syntax check will complain and also <ctrl>+<space> and <shift>+<space> to get autocompletion and calltips won't work anymore inside these sections and JCF code formatting will also fail. Is the usage of these sections in libraries an undocumented feature that only works by accident or should I try to find a fix for the syntax check when I have some time? Bernd -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFLgALrxT6R4jlFoh0RApw3AKDObqa3If1t99WUGghoz9jtzb0OeQCg2Wbj WVa35suVp/TQY3Q5vWmWaas= =TOBV -----END PGP SIGNATURE----- -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Mattias Gärtner
to Thierry Coq

Zitat von Thierry Coq :

Show quoted text 28 lines
[...] Bernd Kreuss wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > library libtest; > > {$mode objfpc}{$H+} > > uses > Windows; > > initialization > MessageBox(0, 'loaded', 'library', 0); > finalization > MessageBox(0, 'unloading', 'library', 0); > end. > > > This will compile and will pop up the messageboxes (at least on windows > it does) but the quick syntax check will complain and also > <ctrl>+<space> and <shift>+<space> to get autocompletion and calltips > won't work anymore inside these sections and JCF code formatting will > also fail. > > Is the usage of these sections in libraries an undocumented feature that > only works by accident or should I try to find a fix for the syntax > check when I have some time?

Fixed.

Mattias

Thierry Coq
to Mattias Gärtner

Thx!

I need to check the latest version. My current production version of Lazarus is getting old ;-)

Thierry

Mattias Ga"rtner wrote 46 lines
Zitat von Thierry Coq : > [...] > Bernd Kreuss wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> library libtest; >> >> {$mode objfpc}{$H+} >> >> uses >> Windows; >> >> initialization >> MessageBox(0, 'loaded', 'library', 0); >> finalization >> MessageBox(0, 'unloading', 'library', 0); >> end. >> >> >> This will compile and will pop up the messageboxes (at least on windows >> it does) but the quick syntax check will complain and also >> <ctrl>+<space> and <shift>+<space> to get autocompletion and calltips >> won't work anymore inside these sections and JCF code formatting will >> also fail. >> >> Is the usage of these sections in libraries an undocumented feature >> that >> only works by accident or should I try to find a fix for the syntax >> check when I have some time? Fixed. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus