Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code counter
Message
From
31/01/2003 15:09:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
31/01/2003 15:01:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00747827
Message ID:
00747833
Views:
20
>Anyone out there know of a decent code counter that works well with foxpro. It needs to differentiate code from remarks and in-line comments as a minimum. Thanks!

The general consensus is that this is not worthwhile. There are just to many arbitrary decisions that have to be made. For instance, you mention ignoring (?) comments. But the comments (and blank spaces) cost you work, and improve the quality of your program. So I decided to just include them, in my own code counter. Of course, it is relatively easy to parse the program file, to ignore lines that start with "*" or "NOTE".

Another question is, how to deal with forms, reports, menus, etc.

Anyway, if you are interested in my primitive prototype, see Lines of code Thread #704650 Message #704650. I decided to post this as download, but the program simply needs to many improvements yet.

To ignore or otherwise segregate comments, you could use alines() to convert the program into an array (with the optimistic assumption that none of your programs has more than 65,000 lines of code), and then parse the individual lines.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform