I have a description at the top of the script that tells the reader what the script does. What would I call that description? A spec? What about a description of the operations of a function, located above the function definition? Would I call that a spec for the function? Thank you.

有帮助吗?

解决方案

It depends on how formal the description is as well as the programming language. I would call it a "description", "documentation", "comment", or (if using something like javadoc or doxygen) a "documentation comment".

Some programming languages have specific terms for this. For example, in Python, there is a specific mechanism for documenting a module or function which would be described as a "docstring".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top