Difference between revisions of "Comment Syntax"

From LemonWiki共筆
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
</pre>
 
</pre>
  
==C: CSS==
+
== C: CSS, Cron ==
 
CSS Code: '''viewable''' when user view the HTML source code<ref>[http://www.w3schools.com/css/css_syntax.asp CSS Syntax]</ref>
 
CSS Code: '''viewable''' when user view the HTML source code<ref>[http://www.w3schools.com/css/css_syntax.asp CSS Syntax]</ref>
 
<pre>
 
<pre>
Line 23: Line 23:
  
 
[http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx Conditional Comments] for {{IE}}
 
[http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx Conditional Comments] for {{IE}}
 +
 +
[https://zh.wikipedia.org/wiki/Cron Cron] jobs code<ref>[https://www.webhostingtalk.com/showthread.php?t=619350 How to comment cron job? | Web Hosting Talk]</ref>
 +
<pre>
 +
# single line
 +
# 0 0 * * 0 execute some script weekly
 +
</pre>
  
 
==D: DOS==
 
==D: DOS==
Line 63: Line 69:
 
MySQL configuration file
 
MySQL configuration file
 
<pre>
 
<pre>
#single line comment
+
# single line comment
  
 
-- single line comment. Note there are one space between '--' with 'single line comment'.
 
-- single line comment. Note there are one space between '--' with 'single line comment'.
Line 76: Line 82:
 
Perl Code<ref>[http://www.tizag.com/perlT/perlsyntax.php perl - syntax]</ref>:
 
Perl Code<ref>[http://www.tizag.com/perlT/perlsyntax.php perl - syntax]</ref>:
 
<pre>
 
<pre>
#single line comment
+
# single line comment
 
</pre>
 
</pre>
  
Line 112: Line 118:
  
 
<pre>
 
<pre>
#single line comment
+
# single line comment
 
</pre>
 
</pre>
  
Line 120: Line 126:
 
[http://groups.csail.mit.edu/uid/sikuli/ SIKULI] Code: ({{exclaim}} multiple line comment is not supported for SIKULI IDE 1.x[https://bugs.launchpad.net/sikuli/+bug/585342])
 
[http://groups.csail.mit.edu/uid/sikuli/ SIKULI] Code: ({{exclaim}} multiple line comment is not supported for SIKULI IDE 1.x[https://bugs.launchpad.net/sikuli/+bug/585342])
 
<pre>
 
<pre>
#single line comment
+
# single line comment
 
</pre>
 
</pre>
  

Latest revision as of 10:18, 11 December 2019

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

A: Apache config[edit]

Configuration Files - Apache HTTP Server Version 2.4

# single line comment


B: Bash (shell script)[edit]

Bash (Unix shell)

# single line comment

C: CSS, Cron[edit]

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

/* multiple lines
comments
*/

Conditional Comments for IE Browser msie.png

Cron jobs code[2]

# single line
# 0 0 * * 0 execute some script weekly

D: DOS[edit]

DOS Command Code[3]:

REM [comment]
ex: REM single line comment

H: HTML[edit]

HTML Code: viewable when user view the HTML source code

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

<!-- multiple 
lines -->

J: Javascript, Java, JSP[edit]

Javascript Code: viewable when user view the HTML source code

//single line comment

/* multiple 
lines
*/


Java[4] & JSP[5]

//single line comment

/* multiple 
lines
*/

M: MySQL[edit]

MySQL configuration file

# single line comment

-- single line comment. Note there are one space between '--' with 'single line comment'.

/* multiple
   lines
   comments
*/

P: Perl, PHP, Python[edit]

Perl Code[6]:

# single line comment


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

# single line comment
// another single line comment

/* multiple 
lines
*/


php.ini

; single line comment

Python: The IPython Notebook[8][9]

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

R[edit]

R: The R Project for Statistical Computing: Commenting Guidelines

# single line comment

Multiline lines comment : Use RStudio (Editing and Executing Code – RStudio Support) to comment/uncomment the selected code. r - Multiline Comment Workarounds? - Stack Overflow

S: SIKULI, SQL[edit]

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[edit]

VBScript Coding Conventions, VBScript Tutorial - Operators

' single line comment

X: XML[edit]

XML Code[10] [11]:

<!--
	multiple lines
-->

References

further reading