Comment Syntax: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 12: Line 12:


==D: DOS==
==D: DOS==
DOS Command Code:
DOS Command Code<ref>[http://www.csulb.edu/~murdock/rem.html DOS Command:  REM]</ref>:
<pre>
<pre>
REM [comment]
REM [comment]
Line 38: Line 38:


==P: Perl, PHP==
==P: Perl, PHP==
Perl Code:
Perl Code<ref>[http://www.tizag.com/perlT/perlsyntax.php perl - syntax]</ref>:
<pre>
<pre>
#single line comment
#single line comment
Line 44: Line 44:




PHP Code: '''not viewable''' when user view the HTML source code
PHP Code: '''not viewable''' when user view the HTML source code<ref>[http://www.tizag.com/phpT/comment.php using comments in php]</ref>
<pre>
<pre>
# single line comment
# single line comment
Line 60: Line 60:
</pre>
</pre>


SQL Command / [http://dev.mysql.com/doc/refman/5.0/en/comments.html MySQL Comment Syntax (MySQL 5.0)]:
SQL Command / [http://dev.mysql.com/doc/refman/5.0/en/comments.html MySQL Comment Syntax (MySQL 5.0)]<ref>[http://dev.mysql.com/doc/refman/5.0/en/comments.html MySQL ::  MySQL 5.0 Reference Manual :: 8.6 Comment Syntax]</ref>:
<pre>
<pre>
/* multiple  
/* multiple  
Line 74: Line 74:


==X: XML==
==X: XML==
XML Code:
XML Code<ref>[http://www.tizag.com/xmlTutorial/xmlcomment.php xml comment]</ref>:
<pre>
<pre>
<!--
<!--
Line 83: Line 83:
Reference
Reference
<references/>
<references/>
* [http://dev.mysql.com/doc/refman/5.0/en/comments.html MySQL ::  MySQL 5.0 Reference Manual :: 8.6 Comment Syntax]
* [http://www.csulb.edu/~murdock/rem.html DOS Command:  REM]
* [http://www.tizag.com/phpT/comment.php using comments in php]
* [http://www.tizag.com/perlT/perlsyntax.php perl - syntax]
* [http://www.tizag.com/xmlTutorial/xmlcomment.php xml comment]

Revision as of 17:40, 1 April 2012

程式的註解語法(Comment Syntax) << Testing

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

Javascript Code: viewable when user view the HTML source code

//single line comment

/* multiple 
lines
*/

P: Perl, PHP

Perl Code[3]:

#single line comment


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

# single line comment
// another single line comment

/* multiple 
lines
*/

S: SIKULI, SQL

SIKULI Code:

#single line comment

SQL Command / MySQL Comment Syntax (MySQL 5.0)[5]:

/* multiple 
lines
*/

V: VBScript

VBScript Coding Conventions, VBScript Tutorial - Operators

' single line comment

X: XML

XML Code[6]:

<!--
	multiple lines
-->

Reference