Solved

Line Counters

Posted on 1998-06-29
2
217 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 50 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 84

Expert Comment

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

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
voltage to force translation ? 8 99
Problem to scan all sheets 3 111
Setting nameservers after res_init fails doing res_query 2 109
IIS Log files on Exchange 2013 server 6 180
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

830 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