Option "RemoveExpressionReturns" of JCF changed to False itself lazarus / 11-Options ---------------------------------------------------------------------- scarscc · 2025-03-26 10:28 Dear all, I found the option of JCF RemoveExpressionReturns often changes itself to False, although I set to true. Is it a bug? ---------------------------------------------------------------------- Thaddy · 2025-03-26 11:26 Afaik jcf is not maintained here but by JEDI unless it is forked. jcf itself is one big bug regarding FPC syntax. E.g. it chokes on many FPC only features, like the way objfpc mode declares and uses generics. And many more. JCF damages your code more often than it helps you. ---------------------------------------------------------------------- marcov · 2025-03-26 12:07 Quote from: Thaddy on March 26, 2025, 12:26:55 pmAfaik jcf is not maintained here but by JEDI unless it is forked. You mean like components/jcf2 in the lazarus sources? ---------------------------------------------------------------------- Thaddy · 2025-03-26 12:14 the not accepting half the syntax one?  Then again, my beloved ptop is also in need of a thorough update. I am not interested in doing that because: - tab is mapped to two spaces, not #9 - I format when I write. Is that old fashioned? ---------------------------------------------------------------------- scarscc · 2025-03-26 13:23 Quote from: Thaddy on March 26, 2025, 12:26:55 pmAfaik jcf is not maintained here but by JEDI unless it is forked. jcf itself is one big bug regarding FPC syntax. E.g. it chokes on many FPC only features, like the way objfpc mode declares and uses generics. And many more. JCF damages your code more often than it helps you. So do you have some recommendations to format code? ---------------------------------------------------------------------- marcov · 2025-03-26 14:12 I do it pretty much like Thaddy, format when I write, and occasionally during refactor.   I don't use automated tools. ---------------------------------------------------------------------- Thaddy · 2025-03-26 15:43 Quote from: marcov on March 26, 2025, 03:12:57 pmI do it pretty much like Thaddy, format when I write, and occasionally during refactor.   I don't use automated tools. Makes us old fashioned... wait....or not... Try Python! Does not allow formatting mistakes. My recommendation is two spaces as indent/unindent for every block. It is usually enough to write a tab stripper that replaces every #9 with #32#32 Most editors, including the Lazarus IDE allow you to configure that. Tabs are evil, except on a real typewriter. Alternatively in the console IDE: ctrl-K I   //indent ctrl-K U  //unindent (wordstar syntax, the Lazarus IDE does not support that AFAIK, most other editors do) ---------------------------------------------------------------------- cdbc · 2025-03-26 16:39 Hi Quote(wordstar syntax, the Lazarus IDE does not support that AFAIK, most other editors do)Hmmm... Both my lazarus' do support that and Ctrl + I/U too... Laz 3.6 & laz 3.3.1 (trunk) Regards Benny ---------------------------------------------------------------------- Thaddy · 2025-03-26 16:44 Did not ever use that. Tnx for the info Benny ---------------------------------------------------------------------- DomingoGP · 2025-03-26 17:59 Jcf2 package mantainer here  . Quote from: scarscc on March 26, 2025, 11:28:56 amI found the option of JCF RemoveExpressionReturns often changes itself to False, although I set to true. Is it a bug? This happens when you set. "Break lines that are longer than max line lenght" to "never" So, it's not a bug, it is a consistency check. Quote from: Thaddy on March 26, 2025, 12:26:55 pmAfaik jcf is not maintained here but by JEDI unless it is forked. The lazarus fork ot JCF is maintained by Me, see commits in components/jcf2. Quote from: Thaddy on March 26, 2025, 12:26:55 pmjcf itself is one big bug regarding FPC syntax. E.g. it chokes on many FPC only features, like the way objfpc mode declares and uses generics. And many more. JCF damages your code more often than it helps you. This is your opinion, and a few years ago it was correct but I honestly believe that with de changes made to the Lazarus fork in the last few years this is no longer true. The Lazarus fork currently supports all the syntax accepted by the trunk version of FPC and some Delphi only syntax like long constants strings and inline vars. I would encourage You to try the latest version of Lazarus and if You find any problems with JCF fill a bug report so we can try to fix it. Regards Domingo. ---------------------------------------------------------------------- Thaddy · 2025-03-26 18:03 I respect your efforts, but there are severe issues, mainly regarding generics. So keep up the good work. ---------------------------------------------------------------------- bytebites · 2025-03-28 07:44 Quote from: Thaddy on March 26, 2025, 12:26:55 pmAfaik jcf is not maintained here but by JEDI unless it is forked. jcf itself is one big bug regarding FPC syntax. E.g. it chokes on many FPC only features, like the way objfpc mode declares and uses generics. And many more. JCF damages your code more often than it helps you. Oh, so silly post from a senior member.