I have in case of the presence of that extra semicolon Jedi Code Format does not work at all. But if remove extra semicolon, it gives out:format with ctrl-d gives:
procedure TForm1.FormActivate(Sender: TObject); ... end; ;
@Fred - I would prefer the in ide formatter. A command line one is very cumbersome.
I want it to format simple if.then.else on a single line and only break when begin is used eg:With your jcfsettings.cfg I have the same extra indent. But in my opinion, if.then.else on a single line is a very bad style.
if.then.else on a single line is a very bad style.
Hi glubbish,
maube you already know, but if you like coincise code in just one line
if Count = 2 then Result := True;
you can do that
Result:=(Count = 2);
Unfortunately you are incorrect.Hi glubbish,
maube you already know, but if you like coincise code in just one line
if Count = 2 then Result := True;
you can do that
Result:=(Count = 2);
No, wrong. No!
This would get the same behaviour:Still, not really relevant to the question, which is about code formatting.
Result := Result or (Cont = 2)
That's not what he said.Unfortunately you are incorrect.Hi glubbish,
maube you already know, but if you like coincise code in just one line
if Count = 2 then Result := True;
you can do that
Result:=(Count = 2);
No, wrong. No!
This would get the same behaviour:Still, not really relevant to the question, which is about code formatting.
Result := Result or (Cont = 2)
Result := Result or (count = 2);
does not always give the same outcome or behaviour as
Result := count = 2;
If Result is initially True, then your OR expression yields True,
but the simple comparison yields False, when count <> 2.
Unfortunately you are incorrect.
Result := Result or (count = 2);
does not always give the same outcome or behaviour as
Result := count = 2;
If Result is initially True, then your OR expression yields True,
but the simple comparison yields False, when count <> 2.
@Zoran
Apologies that I missed your (valid) point.