Alaska Software Inc. - Beautifying source code
Username: Password:
AuthorTopic: Beautifying source code
Mike GraceBeautifying source code
on Tue, 27 Jul 2004 10:32:11 +0100
Is there an option to re-indent all the source code in a project?

Regards

Mike
Richard PulliamRe: Beautifying source code
on Fri, 29 Jun 2007 23:27:37 -0500
Hi,

Look at www.the-oasis.net.  Click and snap.


"Mike Grace" <mikeg@computastat-group.co.uk> wrote in message
news:IyiFny7cEHA.5064@S15147418...
> Is there an option to re-indent all the source code in a project?
>
> Regards
>
> Mike
>
>
Hannes ZieglerRe: Beautifying source code
on Wed, 15 Aug 2007 01:59:53 +0200
Mike,

> Is there an option to re-indent all the source code in a project?

I'd say NO. There is no possibility.

There are tools available that analyze ASCII files containing source code, 
but I'm yet to find a tool suiting my needs.

For the time being my advice is: indent properly while coding and don't use 
Tab.

HTH,
--
Hannes
AUGE_OHRRe: Beautifying source code
on Wed, 15 Aug 2007 03:11:51 +0200
hi,

> There are tools available that analyze ASCII files containing source code,
> but I'm yet to find a tool suiting my needs.
>
> For the time being my advice is: indent properly while coding and don't
> use Tab.

what about CLICK for Xbase++ ?
Olaf had start a Thread in public.xbase++.generic on 26. Juni 2007.

i did use it and found some Problem, which i have posted, but it is Source
Code (Cl*pper / Xbase++) so we shoud be able to enhance missing
Functions or disable Functions which we do not want.

i did a small enhancement while i miss DBF and Index Cross Reference.
i did also include a [Macrolist] Section in CLICK.INI to strip real DBF
Name from NET_USE(myDBF). i also found a Way to identify NTX
Index belong to a DBF ... with CDX i still working ...

so if someone like i will upload it into Olafs CLICK Thread.

greetings by OHR
Jimmy
Hannes ZieglerRe: Beautifying source code
on Wed, 15 Aug 2007 04:01:05 +0200
AUGE_OHR (or whatever your real name is)

> what about CLICK for Xbase++ ?

If you need to review unknown PRG code, CLICK 'might' help to enhance 
readability.

If you want to FORMAT YOUR OUN source code, why didn't you write it readable 
in the first place?

My point is: CLICK is only good to format foreign code. It does not relieve 
you to write proper and readable source code.

That is: if you need CLICK to re-format YOUR source code, you are well 
advised to THINK how to write/format proper source code.

My 2 Cts
--
Hannes
AUGE_OHRRe: Beautifying source code
on Wed, 15 Aug 2007 04:47:43 +0200
hi,

> AUGE_OHR (or whatever your real name is)
Jimmy

> If you want to FORMAT YOUR OUN source code, why didn't you write it 
> readable in the first place?

i do this exessive , but CLICK can do much more than only
reformatiing your Source e.g. Cross Reference of all you
Function/Procedure/Class/Methode. it can also include a
Header to every Function so you can allways "see" which
Modul are calling that Function.

while my Editor ( ETP ) do not know Keyword handling,
i also use it to expand  and convert into UPPER() for nice
looking so i have less to type ( shift only for "" )

> My point is: CLICK is only good to format foreign code. It does not 
> relieve you to write proper and readable source code.
>
> That is: if you need CLICK to re-format YOUR source code, you are well 
> advised to THINK how to write/format proper source code.

i do not need CLICK, like other Programm i wrote, but it make
live much more easy AND it is a second Controll for me to test
if my Code coud be not missunderstood by Xbase++ compiler.

i woud like to see CLICK into VX to create Cross Reference.
i woud be great if XV coud create a Cross Reference from
all Variable in a Project.

you shoud try CLICK for Xbase++, it is a real good work
from Phil Barnett and Olafs modification.

greetings by OHR
Jimmy
Hannes ZieglerRe: Beautifying source code
on Thu, 16 Aug 2007 01:34:14 +0200
Hi,

>> AUGE_OHR (or whatever your real name is)
> Jimmy

Is that "Jimmy Yiu". If so "Hi again"  (we have met after my TBrowse 
session I held during the 1994 Clipper DevCon in Cologne).

> you shoud try CLICK for Xbase++, it is a real good work
> from Phil Barnett and Olafs modification.

Ok, I'll give it a try

Regards,
--
Hannes
AUGE_OHRRe: Beautifying source code
on Thu, 16 Aug 2007 06:08:58 +0200
hi,

>>> AUGE_OHR (or whatever your real name is)
>> Jimmy
>
> Is that "Jimmy Yiu". If so "Hi again"  (we have met after my TBrowse 
> session I held during the 1994 Clipper DevCon in Cologne).

yes im ... was a very nice Time each CA DevCon in Cologne.

1994 ... hm ... was it that year we made a boot tour on Rhein
or did we spend the time in a big Disco where some people from
CA Team dance on the Table ? (i did remember Sabo what was
very funny). i think we got a Video on CD after DevCon 1994 ...

greetings by OHR
Jimmy
Joe Carrick Re: Beautifying source code
on Tue, 14 Aug 2007 18:29:43 -0700
Hi Hannes,

Actually, I created a color source code printing system that has an 
option to reindent using either 3 spaces or tab characters.  It works 
pretty well but I haven't tried to make it work without printing.  I use 
it fairly often, but I really don't want to post it because the last 
time I did there was some nasty comments about "Why would you do 
something so stupid?"

Sorry........


Hannes Ziegler wrote:
> Mike,
> 
> 
>>Is there an option to re-indent all the source code in a project?
> 
> 
> I'd say NO. There is no possibility.
> 
> There are tools available that analyze ASCII files containing source code, 
> but I'm yet to find a tool suiting my needs.
> 
> For the time being my advice is: indent properly while coding and don't use 
> Tab.
> 
> HTH,
> --
> Hannes 
> 
>
Hannes ZieglerRe: Beautifying source code
on Wed, 15 Aug 2007 04:05:47 +0200
Joe,

plese see my response to AUGE_OHR

Regarding your point: I'm pretty reluctant about "SELF CONTAINED 
SOLUTIONS".

I'm sure that you can work with YOUR solution pretty well, but I did not see 
it.

Regards,
--
Hannes


"Joe Carrick" <joe.carrick@dslextreme.com> schrieb im Newsbeitrag 
news:7a00c520$1ed349df$25b714@news.alaska-software.com...
> Hi Hannes,
>
> Actually, I created a color source code printing system that has an option 
> to reindent using either 3 spaces or tab characters.  It works pretty well 
> but I haven't tried to make it work without printing.  I use it fairly 
> often, but I really don't want to post it because the last time I did 
> there was some nasty comments about "Why would you do something so 
> stupid?"
>
> Sorry........
>
>
> Hannes Ziegler wrote:
>> Mike,
>>
>>
>>>Is there an option to re-indent all the source code in a project?
>>
>>
>> I'd say NO. There is no possibility.
>>
>> There are tools available that analyze ASCII files containing source 
>> code, but I'm yet to find a tool suiting my needs.
>>
>> For the time being my advice is: indent properly while coding and don't 
>> use Tab.
>>
>> HTH,
>> --
>> Hannes
Joe Carrick Re: Beautifying source code
on Tue, 14 Aug 2007 18:38:42 -0700
It's really pretty easy to write in Xbase++.

The key is to set up the rules, and read the source in using MemoRead().
Then, analyze line by line and keep a running count (add and subtract 
according to the rules you define) of the tab needs.  Just add that 
number of tabs to the beginning of the trimmed lines and build a new 
string to eventually write back to the source file using MemoWrit().

If you read the directory of the source files and build an array of the 
file names, they can be done in sequence so that the entire project is 
reformatted.

-Joe

Hannes Ziegler wrote:
> Mike,
> 
> 
>>Is there an option to re-indent all the source code in a project?
> 
> 
> I'd say NO. There is no possibility.
> 
> There are tools available that analyze ASCII files containing source code, 
> but I'm yet to find a tool suiting my needs.
> 
> For the time being my advice is: indent properly while coding and don't use 
> Tab.
> 
> HTH,
> --
> Hannes 
> 
>