SLOC counter
Version 1.1.0.0 (741 Bytes) by
Danne Spencer
This script reads a C-File and counts the source lines of code.
707 Downloads
Updated
18 Feb 2009
No License
This script reads a C-File and counts the source lines of code (SLOC).
Following kinds of lines are not counted as source lines of code:
1) //comment
2) /*
...comment
/*
3) empty lines
to run the file:
[code_lines_nb, comment_lines_nb, empty_lines_nb] = get_sloc_cfile = get_sloc_cfile('test.c')
Cite As
Danne Spencer (2024). SLOC counter (https://www.mathworks.com/matlabcentral/fileexchange/22993-sloc-counter), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2006a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Aerospace Applications in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.