Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro metrics
Message
De
10/10/2001 14:10:38
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
10/10/2001 12:24:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00566494
Message ID:
00566566
Vues:
16
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform