Language | In-line comment | Block comment |
C (C99), C++, Go, and JavaScript | // InlineComment | /* BlockComment */ |
CSS | /* 注释内容 */ | /* 注释内容 */ |
HTML | <!--注释内容- -> | <!--注释内容- -> |
Java | // InlineComment |
/** BlockComment */ (Javadoc documentation comment) |
Matlab | % InlineComment | %{ |
PHP | # InlineComment | /* BlockComment */ |
PL/SQL and TSQL | -- InlineComment |
|
Python | # InlineComment | ''' BlockComment ''' (Documentation string when first line of module, class, method, or function)
|
参考:
https://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28syntax%29#Comments