Page 1 of 2

formater za hmg programs

Posted: Wed Sep 28, 2016 6:49 am
by dragancesu
Harbour is good but is more evolved and now the HMG
Unfortunately HMG does not follow everything that was going along the harbour
One of those things is a formatter code, useful thing that I miss

With clipper I used SNAP application for arranging and documentation purposes of the program

Later I was make something like it, a common mistake is to forget to close the loop so I detected

Then came the HMG and many commands DEFINE ... with which I am not spectacular but now I do not have time to fix

Are someone made a program as HBFormat for HMG programs?

Re: formater za hmg programs

Posted: Wed Sep 28, 2016 7:17 am
by serge_girard
Hi Dragan,

I do it manually.... it takes some discipline!

S

Re: formater za hmg programs

Posted: Wed Sep 28, 2016 4:45 pm
by chrisjx2002
Years ago I improved a program from Joe Fannucchi that makes indentation of prg programs.

You wil find attached the source and two language files : english and french.

Re: formater za hmg programs

Posted: Wed Sep 28, 2016 5:26 pm
by serge_girard
Merci Chrisjx2002 !

ça marche,

Serge

Re: formater za hmg programs

Posted: Wed Sep 28, 2016 5:32 pm
by chrisjx2002
De rien...

Re: formater za hmg programs

Posted: Wed Sep 28, 2016 7:26 pm
by esgici
serge_girard wrote:Merci Chrisjx2002 !

ça marche,

Serge
+1

Re: formater za hmg programs

Posted: Thu Sep 29, 2016 6:43 am
by dragancesu
Thank you Chrisjx2002 !

it's very usefull

Dragan

Re: formater za hmg programs

Posted: Thu Sep 29, 2016 7:42 am
by esgici
Look at Click! in the Oasis : legendary utility by sainted Harbour guru and former Harbour manager Phil Barnet (RIP).
Click! is a CA-Clipper and Xbase++ source code reformatter. This is much more than a simple reindenter, but actually reestablishes spacing between elements in the lines of code and creates function cross reference charts.
Fully documented and configurable.

Viva Clipper, viva Harbour, viva HMG :D

Re: formater za hmg programs

Posted: Mon Aug 24, 2020 8:07 am
by Tiger
I just do some more changes on this program:

1. Add option to indent " With Object / End With " structure

2. Add the comments to IF /FOR /WHILE / WITH

IF AAA
IF BBB
IF CCC
ENDIF //CCC
ENDIF //BBB
ENDIF //AAA

It seems work :roll: ... please do a backup 1ST ... if you want to try it ....

Re: formater za hmg programs

Posted: Mon Aug 24, 2020 8:53 am
by dragancesu
This is very good