Comment Syntax: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
Line 33: Line 33:
</pre>
</pre>


==J: Javascript, JSP==
==J: Javascript, Java, JSP==
Javascript Code: '''viewable''' when user view the HTML source code
Javascript Code: '''viewable''' when user view the HTML source code
<pre>
<pre>
Line 44: Line 44:




JSP<ref>[http://www.xyzws.com/JSPfaq/how-to-use-comments-in-jsp-pages/8 How to use comments in JSP pages?]</ref>
Java<ref>[http://www.oracle.com/technetwork/articles/java/index-137868.html How to Write Doc Comments for the Javadoc Tool]</ref> & JSP<ref>[http://www.xyzws.com/JSPfaq/how-to-use-comments-in-jsp-pages/8 How to use comments in JSP pages?]</ref>
<pre>
<pre>
//single line comment
//single line comment

Revision as of 03:30, 1 August 2015

程式或網站服務設定檔的註解語法 (Comment syntax for programming languages or server configuration file) << Testing

B: Bash shell

Bash (Unix shell)

# single line comment

C: CSS

CSS Code: viewable when user view the HTML source code[1]

/* multiple lines
comments
*/

Conditional Comments for IE Browser msie.png

D: DOS

DOS Command Code[2]:

REM [comment]
ex: REM single line comment

H: HTML

HTML Code: viewable when user view the HTML source code

<!-- This is an HTML Comment -->

<!-- multiple 
lines -->

J: Javascript, Java, JSP

Javascript Code: viewable when user view the HTML source code

//single line comment

/* multiple 
lines
*/


Java[3] & JSP[4]

//single line comment

/* multiple 
lines
*/

M: MySQL

MySQL configuration file

#single line comment

P: Perl, PHP, Python

Perl Code[5]:

#single line comment


PHP Code: not viewable when user view the HTML source code[6]

# single line comment
// another single line comment

/* multiple 
lines
*/


php.ini

; single line comment

Python: The IPython Notebook[7][8]

# single line comment
'''
This is the multiline
comments.
'''

S: SIKULI, SQL

SIKULI Code: (Icon_exclaim.gif multiple line comment is not supported for SIKULI IDE 1.x[1])

#single line comment

SQL Command / MySQL 5.1 Comment Syntax:

-- single line comment

/* multiple 
lines
*/

V: VBScript

VBScript Coding Conventions, VBScript Tutorial - Operators

' single line comment

X: XML

XML Code[9] [10]:

<!--
	multiple lines
-->

References

further reading