Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2026-02

Code Syntax

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi,

Sven was kind enough to share the following link:
https://wiki.freepascal.org/Coding_style

From memory, I recall FPC includes a code formatter (can't remember the name). Does the FPC project also include a syntax rules file, so it can automatically reformat code I would like to contribute? 🤞 It's whole new units, not just small line changes.

Regards,
Graeme

Reply by email

Michael Van Canneyt
to Unknown author
Graeme Geldenhuys wrote 9 lines
Hi, Sven was kind enough to share the following link: https://wiki.freepascal.org/Coding_style From memory, I recall FPC includes a code formatter (can't remember the name). Does the FPC project also include a syntax rules file, so it can automatically reformat code I would like to contribute? 🤞 It's whole new units, not just small line changes.

it's called jcf, you can find a command-line version in the lazarus repo.

in components/jcf/commandline or somesuch.

Since it's fair to say that I manage most of FCL, I can empathically state the following:

This WIKI document is not correct, the part about FCL is just plain wrong. I don't know who authored this document, but he clearly never looked at FCL code or RTL code.

For the compiler it is the correct style. For the rest: >> /dev/null

Michael.

Reply by email

Unknown author
to Michael Van Canneyt

Hi Michael,

Michael Van Canneyt wrote
it's called jcf, you can find a command-line version in the lazarus repo.

Hah, okay.

The one I was referring too, I finally found. It is part of the FPC utility
apps (written by you I believe). It's 'ptop', but I can't make head-or-tails
about it's configuration format. LOL. I'm assuming the default format was meant to be what FPC used at the time, but when I tried, the results didn't seem to match FPC's current code style either. So I just manually studied existing 'compiler' code, and adapted my style to match as best I
could. Hopefully I did a good enough job to be convincing [time will tell]. :)

On a side note: the wiki page seems to be missing out a lot of detail though.

For the compiler it is the correct style. For the rest: >> /dev/null

Good to know. 👍

Regards,
- Graeme -

Reply by email

Michael Van Canneyt
to Unknown author
Graeme Geldenhuys wrote 14 lines
Hi Michael, On 2026-02-20 09:31, Michael Van Canneyt via fpc-devel wrote: > > it's called jcf, you can find a command-line version in the lazarus > repo. Hah, okay. The one I was referring too, I finally found. It is part of the FPC utility apps (written by you I believe). It's 'ptop', but I can't make head-or-tails about it's configuration format.

Yes, some documentation is in order.

Michael.

Reply by email

Sven Barth
to Michael Van Canneyt: it's called jcf, you can find a command-line version in the lazarus repo. in…

Michael Van Canneyt via fpc-devel schrieb
am Fr., 20. Feb. 2026, 10:31:

Show quoted text 9 lines
Since it's fair to say that I manage most of FCL, I can empathically state the following: This WIKI document is not correct, the part about FCL is just plain wrong. I don't know who authored this document, but he clearly never looked at FCL code or RTL code. For the compiler it is the correct style. For the rest: >> /dev/null

Well, I mainly pointed Graeme to the Wiki page for the compiler so I didn't really look at the other parts... ^^'

Regards,
Sven

Reply by email