A group of comments that describe the steps in the algorithm for the solution of a program is called?

5 Answers

  • 1 day ago



    -White Paper


  • 1 week ago

    Like EddieJ said, what you're probably supposed to learn is what the textbook or instructor calls it.

    I've called that and heard it called a "block comment".

    Edit: ...and apparently Robert J has too! :^)  ...(didn't see the 2nd part of his answer right away)

  • 1 week ago


    The comments in a program should document what it is doing and how it works.

    It's quite common to have a block comment at the start of a function which describes it's overall operation and what parameters etc. it needs or returns.

    That is in addition to line comments with the program function itself.

  • EddieJ
    Lv 7
    1 week ago

    Your textbook author might be the only person who uses the term.

    Maybe he or she is referring to a "docstring", but, if so, the definition is NOT a close match.

    A group of lines that describe the steps needed for a solution of a problem is called an algorithm -- but you've already used that word -- and most  people wouldn't focus on the algorithm being described in "a group" of anything.

    Pseudocode CAN be put in comments, but doesn't have to be part of comments.

  • How do you think about the answers? You can sign in to vote the answer.
  • 1 week ago

    I don't know what the formal term is.  For either hardware or software, I've called that kind of thing the Theory of Operation.  When I write a routine, I generally will put a paragraph at the top of it in a comment, as you describe, if the algorithm is non-trivial or non-intuitive.  At the top of the file, there might be a big comment detailing the layout of the entire project, revision history, and possibly which functions do what.  I don't have a name for that, but possibly Preface or Header might apply.  "Header" has other specific meanings in software, though.

    At work, this sort of thing was often a section in the software's Internal Reference Specification (IRS), a separate document.  At the very least, a comment in the source code itself would point to this document.  However, I don't think Internal Reference Spec is an industry standard term.

Still have questions? Get your answers by asking now.