- When should we use inline comments?
- What is the difference between full line comment and inline comment?
- What is an inline comment?
- Is it better to place a comment above or below a line of code?
When should we use inline comments?
Inline comments are all comments not included in doc blocs. The goal of in line commenting is to explain code in context. Such explanation may take many different forms. Comments that are written in a readable and narrative style, especially when explaining a complex process, are encouraged.
What is the difference between full line comment and inline comment?
Answer: Full line comments take a complete line while Inline comments share the line with a statement or expression.
What is an inline comment?
English. Inline comments are comments made by an instructor that appear directly on top of your paper. These comments are usually brief.
Is it better to place a comment above or below a line of code?
For simple notes about an individual line, typically alongside. For large chunks, above, so you know what to expect to follow. Generally I except people will want to read the comment that explains how to interpret the code before they read the code. For smaller notes, I stick them on the same line.