Programming language statements typically have conventions for:
statement separators;
statement terminators; and
line continuation
A statement separator is used to demarcate boundaries between two separate statements. A statement terminator is used to demarcate the end of an individual statement. Line continuation is a convention in languages where the newline character could potentially be misinterpreted as a statement terminator. In such languages, it allows a single statement to span more than just one line.
Ellipsis (as three periods–not one special character)
MATLAB: The ellipsis token need not be the last characters on the line, but any following it will be ignored.[5] (In essence, it begins a comment that extends through (i.e. including) the first subsequent newline character. Contrast this with an inline comment, which extends until the first subsequent newline.)
Fortran 77: A non-comment line is a continuation of the previous non-comment line if any non-space character appears in column 6. Comment lines cannot be continued.
Cobol: String constants may be continued by not ending the original string in a PICTURE clause with ', then inserting a - in column 7 (same position as the * for comment is used.)
TUTOR: Lines starting with a tab (after any indentation required by the context) continue the previous command.
[End and Begin] using normal quotes
C and C++ preprocessor: The string is ended normally and continues by starting with a quote on the next line.
Libraries
To import a library is a way to read external, possibly compiled, routines, programs or packages. Imports can be classified by level (module, package, class, procedure,...) and by syntax (directive name, attributes,...)
Scala: import package.class.function, import package.class.{ function => alternativeName, otherFunction }
The above statements can also be classified by whether they are a syntactic convenience (allowing things to be referred to by a shorter name, but they can still be referred to by some fully qualified name without import), or whether they are actually required to access the code (without which it is impossible to access the code, even with fully qualified names).
Inline comments are generally those that use a newline character to indicate the end of a comment, and an arbitrary delimiter or sequence of tokens to indicate the beginning of a comment.
Examples:
Symbol
Languages
C
Fortran 77 and earlier; the 'C' must be in column 1 of a line to indicate a comment.
Block comments are generally those that use a delimiter to indicate the beginning of a comment, and another delimiter to indicate the end of a comment. In this context, whitespace and newline characters are not counted as delimiters.
The indentation of lines in FORTRAN 66/77 is significant. The actual statement is in columns 7 through 72 of a line. Any non-space character in column 6 indicates that this line is a continuation of the previous line. A 'C' in column 1 indicates that this entire line is a comment. Columns 1 though 5 may contain a number which serves as a label. Columns 73 though 80 are ignored and may be used for comments; in the days of punched cards, these columns often contained a sequence number so that the deck of cards could be sorted into the correct order if someone accidentally dropped the cards. Fortran 90 removed the need for the indentation rule and added inline comments, using the ! character as the comment delimiter.
Cobra
Cobra supports block comments with "/# ... #/" which is like the "/* ... */" often found in C-based languages, but with two differences. The # character is reused from the single-line comment form "# ...", and the block comments can be nested which is convenient for commenting out large blocks of code.
Curl
Curl supports block comments with user-defined tags as in |foo# ... #foo|.
Lua
Like raw strings, there can be any number of equals signs between the square brackets, provided both the opening and closing tags have a matching number of equals signs; this allows nesting as long as nested block comments/raw strings use a different number of equals signs than their enclosing comment: --[[comment --[=[ nested comment ]=] ]]. Lua discards the first newline (if present) that directly follows the opening tag.
Perl
Block comments in Perl are considered part of the documentation, and are given the name Plain Old Documentation (POD). Technically, Perl does not have a convention for including block comments in source code, but POD is routinely used as a workaround.
PHP supports standard C/C++ style comments, but supports Perl style as well.
Python
The use of the triple-(double)quotes although sometimes used to comment-out lines of source, does not actually form a comment. The enclosed text becomes a string, usually a string statement. Python usually ignores a lone string as a statement (except when a string is the first statement in the body of a module, class or function; see docstring).
Ruby
As with Python and Perl, Ruby has no specific block-comment syntax. However, like Perl, documentation blocks can be used as block comments as they are ignored by the interpreter.
S-Lang
The region of lines enclosed by the #<tag> and #</tag> delimiters are ignored by the interpreter. The tag name can be any sequence of alphanumeric characters that may be used to indicate how the enclosed block is to be deciphered. For example, #<latex> could indicate the start of a block of LaTeX formatted documentation.
Scheme and Racket
The next complete syntactic component (s-expression) can be commented out with #; .
There is a wide variety of syntax styles for declaring comments in source code. BlockComment in italics is used here to indicate block comment style. InlineComment in italics is used here to indicate inline comment style.
Tags: Comparison of programming languages (syntax), Informatika Komputer, 2242, Perbandingan programming languages (syntax) Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations String functions List comprehension Object oriented programming Object oriented constructors Database access Evaluation strategy Daftar/Tabel, Hello World, programs ALGOL 58's influence on ALGOL 60 ALGOL 60: Compariso, Comparison of programming languages (syntax), Bahasa Indonesia, Contoh Instruksi, Tutorial, Referensi, Buku, Petunjuk, Ilmu politik, Dragonball, Teknik energi listrik s1, Konsultan pendidikan, S1 system nalysis, Sistem informasi s1, Les, Komputerisasi akutansi dan bisnis, Lengkap m.kelas karyawan sebi, prestasi.web.id