Recent

Author Topic: Formatter  (Read 1566 times)

raymono

  • Newbie
  • Posts: 3
Formatter
« on: June 07, 2024, 09:00:54 pm »
What is the best formatter to use for pascal source files (from the command line)?

Tried GNU Indent and atype and they give garbled output ...

dsiders

  • Hero Member
  • *****
  • Posts: 1452
Re: Formatter
« Reply #1 on: June 07, 2024, 09:05:34 pm »
What is the best formatter to use for pascal source files (from the command line)?

Tried GNU Indent and atype and they give garbled output ...

FPC provides ptop. Have you tried it?

https://www.freepascal.org/tools/ptop.html
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

raymono

  • Newbie
  • Posts: 3
Re: Formatter
« Reply #2 on: June 07, 2024, 09:10:54 pm »
Thanks for the quick reply - surprised this forums is so relatively busy.

ptop seems to do the job.

DomingoGP

  • Jr. Member
  • **
  • Posts: 89
Re: Formatter
« Reply #3 on: June 08, 2024, 12:42:15 pm »
Lazarus also offers the command line version of the Jedi code format if you want to try it.

It is required to build the program from
lazarus/components/jcf2/CommandLine/Lazarus/jcf.lpr

raymono

  • Newbie
  • Posts: 3
Re: Formatter
« Reply #4 on: June 08, 2024, 03:16:37 pm »
Thanks - will check.

Regarding ptop, seems to work with valid programs - went into an infinite output generating loop with an invalid program...

Roland57

  • Hero Member
  • *****
  • Posts: 505
    • msegui.net
Re: Formatter
« Reply #5 on: June 08, 2024, 09:50:35 pm »
Hello! You could also try this one.
My projects are on Gitlab and on Codeberg.

dsiders

  • Hero Member
  • *****
  • Posts: 1452
Re: Formatter
« Reply #6 on: June 09, 2024, 12:41:49 am »
Hello! You could also try this one.

Looks interesting. I'd like to try it if I can clear som things off my to-do list.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

 

TinyPortal © 2005-2018