Comments

Comments

Comments

Function

Comments are explanatory text written for humans to explain why the code is written this way, what are the boundaries of a certain section of logic, or to temporarily record matters that need attention. Comments are ignored when BT runs the code, and they do not create variables, return values, or runtime overhead.

Single-line comments

Single-line comments start from // and end at the end of the current line. Good for explaining a line of code, marking a short explanation, or temporarily turning off a line of code while debugging.

Multi-line comments

Multi-line comments start from /* and end at */. Suitable for describing an algorithm, interface convention, configuration block, or temporarily closing multiple lines of code.

Usage suggestions

  • Use // for single-line descriptions, use /* ... */ for multi-line descriptions or temporary blocking of large paragraphs.
  • Comments should be kept in sync with the code. Outdated comments are more likely to mislead readers than no comments at all.