On 11/10/17 10:13, Mattias Gaertner wrote:
On Wed, 11 Oct 2017 10:00:15 +0100
pasc...@piments.com wrote:

Hi ,

First of all: Please do not "reply" when starting a new thread.

I had a little trick that I used on BP and Delphi code that does not
work on Lazarus.

The compiler is FPC.

I define compiler variable which I could toggle on and off by adding a
second opening curly bracket, since the define only works if the line
starts {$


{$DEFINE DEVEL}


If I start the line {{$  Delphi ignores it but Lazarus then highlights
the rest of the code as a comment and it fails to compile.

main.pas(172,1) Warning: Comment level 2 found


Is this a bug or a feature?

It's a feature. You can turn it off with
{$ModeSwitch NestedComments-}

It is disabled by default in $mode delphi.
Can anyone suggest a similar one key trick ?

Any char will do:
{ $directive}

Mattias

Thanks for info about NestedComments. Mattias.

While I did hit "reply to list" in my email client to get list email in the To: field when posting this new subject , I then removed the old subject with "Re. [ .. old subject title ] and put in a new subject title: {$DEFINE DEVEL}

It wasn't a reply because they was no Re and it had a new title.

I should have deleted the  [fpc-pascal]  as well . Sorry.





_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to