Mintoris Forum

Author Topic: Program/project line counter  (Read 2391 times)


  • Sr. Member
  • ****
  • Posts: 126
  • If life throws a planet at you, pull your ripcord‼
Program/project line counter
« on: Apr 12, 2011, 06:19 AM »
I became interested in counting source code lines in a project some years ago when I developed a massive application for a chemical company that was well over 25,000 lines long. That's code lines, not blank or comment lines.  At that time I was writing in VB6 and had written a small app to count all the lines for me.

I've done the same here with Mintoris basic. Attached please find LineCounter.bas. It will count the lines of a single .bas file, as well as all the files included by it. It can even detect and count nested includes. But as Chuck once said, it would be a very bad thing for a file to include itself. It also distinguishes between rem/comment lines, blank lines, and lines of actual source code, and displays these totals for each file as well as grand totals at the bottom.

When LineCounter starts, it will come up with a file open dialog / picker. Just touch the file you want to count, or navigate to it by touching the [directory] entries and touch it there. The rest is all automatic.

Hope you enjoy this…
« Last Edit: Apr 12, 2011, 06:23 AM by Jesse »