Sign in Join

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

Mailing lists / fpc-pascal / 2005-11

strange compiler message

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Unknown author

Hi,

When I want to compile a unit, I get a strange error message:

Warning: Comment level 2 found

The lines involved do contain comments that use brackets {}.

Anybody any ideas what might be causing the compiler messages??

Darius Blaszijk

Reply by email

Michalis Kamburelis
to Unknown author: When I want to compile a unit, I get a strange error message: Warning: Comment level 2…
Show quoted text 10 lines
Hi, When I want to compile a unit, I get a strange error message: Warning: Comment level 2 found The lines involved do contain comments that use brackets {}. Anybody any ideas what might be causing the compiler messages??

"Comment level 2 found" is only a warning, so I guess that you get some error message further. "Comment level 2 found" means that you triggered nested comments mechanism. In FPC in objfpc (and fpc and probably some others) modes, comments can be nested, which means that e.g.

   {$mode objfpc} { { } begin end.

*is not* a valid Pascal program. But in Delphi mode, e.g.

   {$mode delphi} { { } begin end.

*is* a valid program.

In other words: what you want is probably to just compile your unit in delphi mode, so that nested comments are off.

Michalis

Reply by email