Comment Syntax: Difference between revisions
m (→C: CSS, Cron) |
(+ postman) |
||
| Line 79: | Line 79: | ||
</pre> | </pre> | ||
==P: Perl, PHP, Python== | ==P: Perl, PHP, Postman, Python== | ||
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> | ||
| Line 100: | Line 100: | ||
<pre> | <pre> | ||
; single line comment | ; single line comment | ||
</pre> | |||
Postman<ref>[https://github.com/postmanlabs/postman-app-support/issues/3358 Feature request: Raw body editor JSON comment · Issue #3358 · postmanlabs/postman-app-support · GitHub]</ref> | |||
<pre> | |||
// single line comment | |||
</pre> | </pre> | ||
Revision as of 17:27, 27 April 2021
程式或網站服務設定檔的註解語法 (Comment syntax for programming languages or server configuration file) << Testing
A: Apache config
Configuration Files - Apache HTTP Server Version 2.4
# single line comment
B: Bash (shell script)
# single line comment
C: CSS, Cron
CSS Code: viewable when user view the HTML source code[1]
/* multiple lines comments */
Conditional Comments for IE
# single line # 0 0 * * 0 execute some script weekly
D: DOS
DOS Command Code[3]:
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 */
//single line comment /* multiple lines */
M: MySQL
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, Postman, Python
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
Postman[8]
// single line comment
Python: The IPython Notebook[9][10]
# single line comment
''' This is the multiline comments. '''
R
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
SIKULI Code: (
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
<!-- multiple lines -->
References
- ↑ CSS Syntax
- ↑ How to comment cron job? | Web Hosting Talk
- ↑ DOS Command: REM
- ↑ How to Write Doc Comments for the Javadoc Tool
- ↑ How to use comments in JSP pages?
- ↑ perl - syntax
- ↑ using comments in php
- ↑ Feature request: Raw body editor JSON comment · Issue #3358 · postmanlabs/postman-app-support · GitHub
- ↑ Python for Developers - Chapter 2: Syntax
- ↑ Multiline comments in Python - Stack Overflow
- ↑ xml comment
- ↑ XML 字元實體和 XAML
further reading