Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
1
Task/Comments/Asymptote/comments.asymptote
Normal file
1
Task/Comments/Asymptote/comments.asymptote
Normal file
|
|
@ -0,0 +1 @@
|
|||
// double slash to newline
|
||||
2
Task/Comments/BASIC/comments-1.basic
Normal file
2
Task/Comments/BASIC/comments-1.basic
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
100 ' Standard BASIC comments begin with "REM" (remark) and extend to the end of the line
|
||||
110 PRINT "this is code": REM comment after statement
|
||||
2
Task/Comments/BASIC/comments-2.basic
Normal file
2
Task/Comments/BASIC/comments-2.basic
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
'this is a comment
|
||||
PRINT "this is code" 'comment after statement
|
||||
|
|
@ -1 +1 @@
|
|||
*> This comment syntax was defined in COBOL 2002.
|
||||
D DISPLAY "Debug"
|
||||
|
|
|
|||
1
Task/Comments/COBOL/comments-3.cobol
Normal file
1
Task/Comments/COBOL/comments-3.cobol
Normal file
|
|
@ -0,0 +1 @@
|
|||
*> This comment syntax was defined (with free format code) in COBOL 2002.
|
||||
1
Task/Comments/COBOL/comments-4.cobol
Normal file
1
Task/Comments/COBOL/comments-4.cobol
Normal file
|
|
@ -0,0 +1 @@
|
|||
>>D DISPLAY "Debug"
|
||||
3
Task/Comments/COBOL/comments-5.cobol
Normal file
3
Task/Comments/COBOL/comments-5.cobol
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
NOTE this paragraph is
|
||||
commented out and ignored
|
||||
.
|
||||
4
Task/Comments/Chapel/comments.chapel
Normal file
4
Task/Comments/Chapel/comments.chapel
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// single line
|
||||
|
||||
/* multi
|
||||
line */
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
As ColdFusion's grammar is based around HTML syntax, commenting is similar to HTML. Note that in the examples below, you will need to remove the space between the < and the !.
|
||||
< !--- This is a comment. Nothing in this tag can be seen by the end user.
|
||||
As ColdFusion's grammar is based around HTML syntax, commenting is similar to HTML.
|
||||
<!--- This is a comment. Nothing in this tag can be seen by the end user.
|
||||
Note the three-or-greater dashes to open and close the tag. --->
|
||||
< !-- This is an HTML comment. Any HTML between the opening and closing of the tag will be ignored, but any ColdFusion code will still run.
|
||||
<!-- This is an HTML comment. Any HTML between the opening and closing of the tag will be ignored, but any ColdFusion code will still run.
|
||||
Note that in the popular FuseBox framework for ColdFusion, the circuit.xml files require that you use this style of comment. -->
|
||||
|
|
|
|||
3
Task/Comments/Component-Pascal/comments.component
Normal file
3
Task/Comments/Component-Pascal/comments.component
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(* Comments (* can nest *)
|
||||
and they can span multiple lines.
|
||||
*)
|
||||
22
Task/Comments/D/comments.d
Normal file
22
Task/Comments/D/comments.d
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
void main() {
|
||||
// A single line comment.
|
||||
|
||||
/* This is a simple C-style comment that can't be nested.
|
||||
Comments mostly work similar to C, newlines are irrelevant.
|
||||
*/
|
||||
|
||||
/+ This is a nestable comment
|
||||
/+ See?
|
||||
+/
|
||||
+/
|
||||
|
||||
/// Documentation single line comment.
|
||||
|
||||
/**
|
||||
Simple C-style documentation comment.
|
||||
*/
|
||||
|
||||
/++
|
||||
Nestable documenttion comment.
|
||||
+/
|
||||
}
|
||||
7
Task/Comments/Dylan/comments.dylan
Normal file
7
Task/Comments/Dylan/comments.dylan
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// This is a comment
|
||||
|
||||
/*
|
||||
This is a comment
|
||||
that spans multiple
|
||||
lines
|
||||
*/
|
||||
10
Task/Comments/Java/comments-6.java
Normal file
10
Task/Comments/Java/comments-6.java
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
public class JustComments {
|
||||
/*
|
||||
\u002A\u002F\u0070\u0075\u0062\u006C\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063
|
||||
\u0020\u0076\u006F\u0069\u0064\u0020\u006D\u0061\u0069\u006E\u0028
|
||||
\u0053\u0074\u0072\u0069\u006E\u0067\u005B\u005D\u0061\u0072\u0067\u0073\u0029
|
||||
\u007B\u0053\u0079\u0073\u0074\u0065\u006D\u002E\u006F\u0075\u0074\u002E
|
||||
\u0070\u0072\u0069\u006E\u0074\u006C\u006E\u0028\u0022\u0048\u0065\u006C\u006C\u006F\u0022
|
||||
\u002B\u0022\u0020\u0057\u006F\u0072\u006C\u0064\u0021\u0022\u0029\u003B\u007D\u002F\u002A
|
||||
*/
|
||||
}
|
||||
8
Task/Comments/M4/comments-1.m4
Normal file
8
Task/Comments/M4/comments-1.m4
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
eval(2*3) # eval(2*3) "#" and text after it aren't processed but passed along
|
||||
|
||||
dnl this text completely disappears, including the new line
|
||||
|
||||
divert(-1)
|
||||
Everything diverted to -1 is processed but the output is discarded.
|
||||
A comment could take this form as long as no macro names are used.
|
||||
divert
|
||||
1
Task/Comments/M4/comments-2.m4
Normal file
1
Task/Comments/M4/comments-2.m4
Normal file
|
|
@ -0,0 +1 @@
|
|||
some text`'dnl then a deleted comment
|
||||
2
Task/Comments/M4/comments-3.m4
Normal file
2
Task/Comments/M4/comments-3.m4
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
changecom(%)
|
||||
% now percent prevents macro expansion
|
||||
2
Task/Comments/M4/comments-4.m4
Normal file
2
Task/Comments/M4/comments-4.m4
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
changecom()
|
||||
GNU m4 now no macro expansion suppression character at all
|
||||
2
Task/Comments/M4/comments-5.m4
Normal file
2
Task/Comments/M4/comments-5.m4
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
changecom(/*,*/)
|
||||
/* GNU m4 now no macro expansion in C style comments */
|
||||
|
|
@ -1,9 +1,2 @@
|
|||
"""Un-assigned strings in triple-quotes might be used
|
||||
as multi-line comments
|
||||
"""
|
||||
|
||||
'''
|
||||
"triple quoted strings" can be delimited by either 'single' or "double" quote marks; and they can contain mixtures
|
||||
of other quote marks without any need to \escape\ them using any special characters. They also may span multiple
|
||||
lines without special escape characters.
|
||||
'''
|
||||
# This is a comment
|
||||
foo = 5 # You can also append comments to statements
|
||||
|
|
|
|||
|
|
@ -1,17 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
# Example of using doc strings
|
||||
"""My Doc-string example"""
|
||||
"""Un-assigned strings in triple-quotes might be used
|
||||
as multi-line comments
|
||||
"""
|
||||
|
||||
class Foo:
|
||||
'''Some documentation for the Foo class'''
|
||||
def __init__(self):
|
||||
"Foo's initialization method's documentation"
|
||||
|
||||
def bar():
|
||||
"""documentation for the bar function"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
print (__doc__)
|
||||
print (Foo.__doc__)
|
||||
print (Foo.__init__.__doc__)
|
||||
print (bar.__doc__)
|
||||
'''
|
||||
"triple quoted strings" can be delimited by either 'single' or "double" quote marks; and they can contain mixtures
|
||||
of other quote marks without any need to \escape\ them using any special characters. They also may span multiple
|
||||
lines without special escape characters.
|
||||
'''
|
||||
|
|
|
|||
17
Task/Comments/Python/comments-3.py
Normal file
17
Task/Comments/Python/comments-3.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env python
|
||||
# Example of using doc strings
|
||||
"""My Doc-string example"""
|
||||
|
||||
class Foo:
|
||||
'''Some documentation for the Foo class'''
|
||||
def __init__(self):
|
||||
"Foo's initialization method's documentation"
|
||||
|
||||
def bar():
|
||||
"""documentation for the bar function"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
print (__doc__)
|
||||
print (Foo.__doc__)
|
||||
print (Foo.__init__.__doc__)
|
||||
print (bar.__doc__)
|
||||
|
|
@ -18,7 +18,7 @@ via a continued line, as in the manner of:
|
|||
'would I be wearing this one?' ,
|
||||
' --- Abraham Lincoln'
|
||||
|
||||
Here come's the thingy that ends this REXX comment. ───┐
|
||||
Here comes the thingy that ends this REXX comment. ───┐
|
||||
│
|
||||
│
|
||||
↓
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
-- A REXX line comment
|
||||
|
||||
say "something" -- another line comment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue