Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro metrics
Message
From
10/10/2001 14:10:38
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
10/10/2001 12:24:14
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00566494
Message ID:
00566566
Views:
15
>Has anyone used any tools for generating project metrics such as total line count for a project?

This simple thing counts rows in all prgs in one directory. It can easily be adapted to scan through a project and count the lines in each of the Methods memo of classes and forms, Tag fields of reports' and labels' dataenvironments, and thus count everything.
#define cr chr(13)+chr(10)
_cnt=0
_cnc=0
n=adir(a,"*.prg")
=asort(a)
for i= 1 to n
	m=filetostr(a[i,1])
	_x=occu(cr,m)
	_c=occu(cr+"*",m)
	? a(i,1), tran(_x, "999999") at 26, tran(_c, "999999") at 40
	_cnt=_cnt+_x
	_cnc=_cnc+_c
endf
? "Total",_cnt, "commented",_cnc

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform