Recent

Author Topic: Option "RemoveExpressionReturns" of JCF changed to False itself  (Read 1197 times)

scarscc

  • Newbie
  • Posts: 2
Dear all,

I found the option of JCF RemoveExpressionReturns often changes itself to False, although I set to true.

Is it a bug?

Thaddy

  • Hero Member
  • *****
  • Posts: 16811
  • Ceterum censeo Trump esse delendam
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #1 on: March 26, 2025, 12:26:55 pm »
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.
« Last Edit: March 26, 2025, 12:33:02 pm by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12156
  • FPC developer.
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #2 on: March 26, 2025, 01:07:01 pm »
Afaik jcf is not maintained here but by JEDI unless it is forked.

You mean like components/jcf2 in the lazarus sources?

Thaddy

  • Hero Member
  • *****
  • Posts: 16811
  • Ceterum censeo Trump esse delendam
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #3 on: March 26, 2025, 01:14:06 pm »
;) the not accepting half the syntax one?  8-)
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?
« Last Edit: March 26, 2025, 01:17:16 pm by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

scarscc

  • Newbie
  • Posts: 2
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #4 on: March 26, 2025, 02:23:55 pm »
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.


So do you have some recommendations to format code?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12156
  • FPC developer.
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #5 on: March 26, 2025, 03:12:57 pm »
I do it pretty much like Thaddy, format when I write, and occasionally during refactor.   I don't use automated tools.

Thaddy

  • Hero Member
  • *****
  • Posts: 16811
  • Ceterum censeo Trump esse delendam
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #6 on: March 26, 2025, 04:43:20 pm »
I do it pretty much like Thaddy, format when I write, and occasionally during refactor.   I don't use automated tools.
Makes us old fashioned... :( 8)

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)
« Last Edit: March 26, 2025, 04:57:45 pm by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

cdbc

  • Hero Member
  • *****
  • Posts: 2103
    • http://www.cdbc.dk
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #7 on: March 26, 2025, 05:39:42 pm »
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
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

Thaddy

  • Hero Member
  • *****
  • Posts: 16811
  • Ceterum censeo Trump esse delendam
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #8 on: March 26, 2025, 05:44:25 pm »
Did not ever use that.
Tnx for the info Benny
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

DomingoGP

  • Jr. Member
  • **
  • Posts: 85
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #9 on: March 26, 2025, 06:59:34 pm »
Jcf2 package mantainer here  :).

I 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.

Afaik 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.

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.

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

  • Hero Member
  • *****
  • Posts: 16811
  • Ceterum censeo Trump esse delendam
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #10 on: March 26, 2025, 07:03:42 pm »
I respect your efforts, but there are severe issues, mainly regarding generics.
So keep up the good work.
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

bytebites

  • Hero Member
  • *****
  • Posts: 709
Re: Option "RemoveExpressionReturns" of JCF changed to False itself
« Reply #11 on: March 28, 2025, 08:44:51 am »
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.

Oh, so silly post from a senior member. >:D

 

TinyPortal © 2005-2018