Collection of comment styles.
June 03, 2007 @ 07:36 AM | posted by carmelyne
(last updated: 08.08.07)Single line comments:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
AppleScript (*Hello I am a comment*)
ASP <% 'Hello I am a comment. %>
Bash # Hello I am a comment
C // Hello I am a comment
C++ /* Hello I am a comment */
CSS /* Hello I am a comment */
Coldfusion <!--- Hello I am a comment --->
DOS :: Hello I am a comment
Erlang % Hello I am a comment
HTML <!-- Hello I am a comment -->
Java // Hello I am a comment
JavaScript /* Hello I am a comment */
Liquid {% comment %} Hello I am a comment {% endcomment %}
Lua -- Hello I am a comment --
Perl # Hello I am a comment
PHP <?php // Hello I am a comment ?>
Python # Hello I am a comment
Regex (?#Hello I am a comment)
Rails <%# Hello I am a comment %>
Ruby # Hello I am a comment
Smarty {* Hello I am a comment *}
XML <!-- Hello I am a comment -->
YAML # Hello I am a comment
|
I've been wondering what comment style is used in Liquid.
Got any to share?
[ Last updated: August 08, 2007 @ 10:48 PM ]
11 Responses to...
“Collection of comment styles.”
Sorry, comments are closed for this article.




Python has # comment, not // comment
Posted: June 3rd, 2007 at 02:05 PM
@armin, you're correct. I've updated the post. Thank you. :)
Posted: June 3rd, 2007 at 02:58 PM
The DOS shell uses the double-colon:
::
Posted: June 4th, 2007 at 11:59 AM
Erlang: % this is a comment
Posted: June 5th, 2007 at 02:47 AM
@topfunky, DOS is always almost forgotten. Thanks for that input.
@stoyan, thanks on the Erlang input. I've been meaning to check Erlang.
Posted: June 5th, 2007 at 04:35 AM
C++ uses both (C-kind) styles, and C uses the first, or both, from C99 forward:
/* This is a comment. */ // So is this.
Posted: June 6th, 2007 at 08:17 AM
@João, Thanks for the C++.
Posted: June 7th, 2007 at 05:55 PM
According to the Liquid help at Shopify, Liquid uses this form:
Hi there. {% comment %} I am hidden. {% endcomment %}
Posted: June 9th, 2007 at 08:05 AM
@damon, Thanks. I can officially hi now!
Posted: June 9th, 2007 at 11:58 PM
21 AppleScript -- Hello I am a comment
Posted: July 1st, 2007 at 03:09 PM
Thanks, Sherno.
Posted: July 5th, 2007 at 05:36 PM