SLOC counter

This script reads a C-File and counts the source lines of code.
709 download
Aggiornato 18 feb 2009

Nessuna licenza

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')

Cita come

Danne Spencer (2025). SLOC counter (https://it.mathworks.com/matlabcentral/fileexchange/22993-sloc-counter), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2006a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Aerospace Applications in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.1.0.0

- output also the number of comment lines and number of empty lines.

1.0.0.0