Comments { } problem lazarus / 9-Editor ---------------------------------------------------------------------- hnb · 2008-04-07 20:39 Hi all, I use a lot of comments Code: [Select]{-----------------------------------------------   Bla {----------------------------------------------} in my code. It's compile fine, with directive {$MODE DELPHI} (without this directive all of code aftrer {--- is commented). But... All code in editor highlighter is still commented after {--- (this is not comfortably, and i can't use Lazarus as my primary code editor) ! It's any trick to fix this, without changing comments style (it is very important!)? ---------------------------------------------------------------------- Leledumbo · 2008-04-08 08:49 The default fpc mode and objfpc mode doesn't support nested comments like that, see Comments. ---------------------------------------------------------------------- hnb · 2008-04-08 13:40 But Lazarus IDE? A lot of code use nested comments... So I cant write code with this IDE ---------------------------------------------------------------------- OnixJr · 2008-04-08 15:58 Hmmm, it's true... I has noticed it... My Idea: Open a new report in bugtracker, and ask to the developers to modify Object-Pascal Highlighter to recognises only one comment (when delphi mode is defined).    If they agree, it may take a while ... If you have enough time and knowledge, I suggest that yourself modify and send a patch... Regards, Júnior ---------------------------------------------------------------------- hnb · 2008-04-08 18:11 Reported -,- LazTarget : post 1.2 ... ---------------------------------------------------------------------- Leledumbo · 2008-04-09 08:03 Nested comments are allowed if there's no same comment delimiter inside the comment. For example: { Comment1 (* Comment2 *) Comment3 } QuoteBut Lazarus IDE? A lot of code use nested comments... I'm not really sure, but please recompile the IDE and check what compiler options it use. I've noticed that when compiling the IDE, I only got: Quotewarning: comment level 2 found But when I have it in my code, I got: Quotefatal: comment level 2 found Btw, I've got a faster solution. Avoid nested comments, yay! ---------------------------------------------------------------------- Vincent Snijders · 2008-04-09 12:18 Quote from: "hnb"Reported -,- LazTarget : post 1.2 ... Which means: not critical, we are waiting for patches from the community to fix this issue. ---------------------------------------------------------------------- hnb · 2008-10-27 12:35 Yeah fixed in 0.9.26, now I love Lazarus and I can use this IDE ^^ go, go Lazarus!