sloc

版本 1.0.0.0 (2.4 KB) 作者: Raymond Norris
Count lines of source code for an M-file
6.6K 次下载
更新时间 2006/3/9

查看许可证

Counts the lines of source code in an M-file.

A line of source code is defined to be not a comment line, not a continuation of a previous line, and not an empty line.

The function line is included. SLOC returns the line count for the entire file, not for individual functions of a file.

If more than more statement is on the same line, that it treated as one line. For example, the line:

minx = 32; maxx = 100;

is one line of source code.

引用格式

Raymond Norris (2024). sloc (https://www.mathworks.com/matlabcentral/fileexchange/3900-sloc), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Bug fixes:
(1) The MATLAB Profiler does not include the "function" line in it's metrics, so do not count the "function" line or any "function" lines for subfunctions. (2) Also, functions (particulary nested) may be indented, so minor fix for that.