Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you get a count of the lines of code
Message
From
24/08/1999 17:06:55
Bruno Di Lalla
Bdl Computer Consulting
Greely, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00257293
Message ID:
00257323
Views:
18
>>A client has requested the number of lines of code in one of our systems [I don't know why -- the request was forwarded to me]. Is there an easy way to get this info -- is this number [or something similar] stored somewhere in the project?
>>
>>Thanks
>>Doug
>
>Including lines of code in VCXs, PRGs, SCXs, MNXs, and QPRs? I would suggest writing a small prg to sum all the memlines() in the method fields of all the VCX and SCX files. Then you have Procedure and Command fields in the MNX to sum the memlines() for. I think you can use the Debugger profiler to get line numbers for PRGs. You might be better off appending the PRGs into a dummy dbf and counting the non-blank and non-commented lines. Of course, the line continuations [semi-colons] would slightly inflate this count. So, you could count how many non-commented lines end in a semi-colon to subtract this number off.
>
>You can do a SELECT TYPE, NAME,, HOMEDIR from the PJX file for TYPES of M, K, and V [menus, forms and classes] to get the list of items to count memlines for.
>
>Good luck.

Another method, if you want all VCXs, PRGs, etc., is to run the document wizard. It will create a file named after your project name with an extension .lst

This file contains the entire listing of the application, including Referential integrity code. You may then open this file as a program file in VFP and check the status bar for the number of lines.

Note: For the number of lines to show in the status bar, right click the program window, click on properties, and check the option Show line/column position. Also, when using the document wizard, don't select to generate the file listing as this takes forever.

If you require more details, let me know.
Bruno Di Lalla
Consultant
BDL Computer Consulting
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform