Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Line Counters

Posted on 1998-06-29
2
Medium Priority
?
221 Views
Last Modified: 2011-09-20
Does anyone know of a good line counter utility that counts lines of code?  The program needs to count lines of individual functions also.
0
Comment
Question by:kph1
2 Comments
 
LVL 2

Accepted Solution

by:
JYoungman earned 100 total points
ID: 1251491
Under Unix, I just use the command
      tr -dc '{;' | wc -c
This counts semicolons and opening braces as "lines of code"
only.   That's good for coping with varying amounts of comments.
If you don't use Unix, you can do the same in a very short C++ program of your own writing.

0
 
LVL 85

Expert Comment

by:ozo
ID: 1251492
Unless you have /* {; */ in comments...
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question