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