It depends on the language.
In most cases a remark or comment is denoted by a token or symbol such that the remainder of that line is ignored by the language compiler or interpreter. That is, the comment extends to the end of the line it appears on (known as a single-line comment). However, some languages require that comments be placed on a separate line, by themselves, including BASIC which traditionally opens a comment with the keyword REM (short for remark).
In C, comments are enclosed in paired delimiters, beginning with /* and ending with */. This convention allows comments to extend across multiple lines as well as to insert comments inside code statements. Languages derived from C, including C++ and C#, also use this convention (known as a C-style comment), but they also allow single-line comments beginning with a // (double-slash) token. Java uses the same syntax as C++ and therefore uses the same comment style. Some languages use the # (pound) symbol to begin a comment while Visual Basic uses a ' (apostrophe).
Additional information on comments can be found in your language documentation.
Chat with our AI personalities
Javascript uses C-style comments, for block comments (multiline) use: /* comments go anywhere in here */ for short one line comments use double-slash: // this is also a comment
I don't use that function in C programme.
Anytime you wish to create any type of remark in a batch file rem must be added in front of the line. Remarks are often used to skip a line in the batch file or make comments.
Use loops only when required and add proper loop termination conditionsDo not duplicate code. Try to re-use code as much as possibleAlways add comments to the methods
Comments are very important in a HTML code. They are started by <!-- and ended by --!>