2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,7 +1,14 @@
|
|||
All ways to include text in a language source file
|
||||
;Task:
|
||||
Show all ways to include text in a language source file
|
||||
that's completely ignored by the compiler or interpreter.
|
||||
|
||||
'''See Also:'''<br>
|
||||
* Related Task: [[Documentation]]
|
||||
* [https://en.wikipedia.org/wiki/Comment_(computer_programming) Wikipedia]
|
||||
* [http://xkcd.com/156 xkcd] (Humor: hand gesture denoting <code>//</code> for "commenting out" people.)
|
||||
|
||||
;Related tasks:
|
||||
* [[Documentation]]
|
||||
* [[Here_document]]
|
||||
|
||||
|
||||
;See also:
|
||||
* [https://en.wikipedia.org/wiki/Comment_(computer_programming) Wikipedia]
|
||||
* [http://xkcd.com/156 xkcd] (Humor: hand gesture denoting <code>//</code> for "commenting out" people.)
|
||||
<br><br>
|
||||
|
|
|
|||
1
Task/Comments/APL/comments.apl
Normal file
1
Task/Comments/APL/comments.apl
Normal file
|
|
@ -0,0 +1 @@
|
|||
⍝ This is a comment
|
||||
9
Task/Comments/Agena/comments.agena
Normal file
9
Task/Comments/Agena/comments.agena
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# single line comment
|
||||
|
||||
#/ multi-line comment
|
||||
- ends with the "/ followed by #" terminator on the next line
|
||||
/#
|
||||
|
||||
/* multi-line comment - C-style
|
||||
- ends with the "* followed by /" terminator on the next line
|
||||
*/
|
||||
12
Task/Comments/AppleScript/comments-1.applescript
Normal file
12
Task/Comments/AppleScript/comments-1.applescript
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
--This is a single line comment
|
||||
|
||||
display dialog "ok" --it can go at the end of a line
|
||||
|
||||
# Hash style comments are also supported
|
||||
|
||||
(* This is a multi
|
||||
line comment*)
|
||||
|
||||
(* This is a comment. --comments can be nested
|
||||
(* Nested block comment *)
|
||||
*)
|
||||
1
Task/Comments/AppleScript/comments-2.applescript
Normal file
1
Task/Comments/AppleScript/comments-2.applescript
Normal file
|
|
@ -0,0 +1 @@
|
|||
display dialog "ok" #Starting in version 2.0, end-line comments can begin with a hash
|
||||
11
Task/Comments/COBOL/comments-6.cobol
Normal file
11
Task/Comments/COBOL/comments-6.cobol
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. program.
|
||||
|
||||
AUTHOR. Rest of line ignored.
|
||||
REMARKS. Rest of line ignored.
|
||||
REMARKS. More remarks.
|
||||
SECURITY. line ignored.
|
||||
INSTALLATION. line ignored.
|
||||
DATE-WRITTEN. same, human readable dates are allowed for instance
|
||||
DATE-COMPILED. same.
|
||||
DATE-MODIFIED. this one is handy when auto-stamped by an editor.
|
||||
4
Task/Comments/Elena/comments.elena
Normal file
4
Task/Comments/Elena/comments.elena
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
//single line comment
|
||||
|
||||
/*multiple line
|
||||
comment*/
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
// This is a single-line comment
|
||||
|
||||
/* This is a comment
|
||||
that spans multiple lines
|
||||
and so on.
|
||||
|
|
|
|||
10
Task/Comments/Processing/comments
Normal file
10
Task/Comments/Processing/comments
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// a single-line comment
|
||||
|
||||
/* a multi-line
|
||||
comment
|
||||
*/
|
||||
|
||||
/*
|
||||
* a multi-line comment
|
||||
* with some decorative stars
|
||||
*/
|
||||
|
|
@ -1,42 +1,3 @@
|
|||
/*REXX program to demonstrate various uses and types of comments. */
|
||||
|
||||
/* everything between a "climbstar" and a "starclimb" (exclusive of literals) is
|
||||
a comment.
|
||||
climbstar = /* [slash-asterisk]
|
||||
starclimb = */ [asterisk-slash]
|
||||
|
||||
/* this is a nested comment, by gum! */
|
||||
/*so is this*/
|
||||
|
||||
Also, REXX comments can span multiple records.
|
||||
|
||||
There can be no intervening character between the slash and asterisk (or
|
||||
the asterisk and slash). These two joined characters cannot be separated
|
||||
via a continued line, as in the manner of:
|
||||
|
||||
say 'If I were two─faced,' ,
|
||||
'would I be wearing this one?' ,
|
||||
' --- Abraham Lincoln'
|
||||
|
||||
Here comes the thingy that ends this REXX comment. ───┐
|
||||
│
|
||||
│
|
||||
↓
|
||||
|
||||
*/
|
||||
|
||||
hour = 12 /*high noon */
|
||||
midnight = 00 /*first hour of the day */
|
||||
suits = 1234 /*card suits: ♥ ♦ ♣ ♠ */
|
||||
|
||||
hutchHdr = '/*'
|
||||
hutchEnd = "*/"
|
||||
|
||||
/* the previous two "hutch" assignments aren't
|
||||
the start nor the end of a REXX comment. */
|
||||
|
||||
x=1000000 ** /*¡big power!*/ 1000
|
||||
|
||||
/*not a real good place for a comment (above),
|
||||
but essentially, a REXX comment can be
|
||||
anywhere whitespace is allowed. */
|
||||
/*REXX program that demonstrates what happens when dividing by zero. */
|
||||
y=7
|
||||
say 44 / (7-y) /* divide by some strange thingy.*/
|
||||
|
|
|
|||
|
|
@ -1,2 +1,42 @@
|
|||
-- A REXX line comment
|
||||
say "something" -- another line comment
|
||||
/*REXX program to demonstrate various uses and types of comments. */
|
||||
|
||||
/* everything between a "climbstar" and a "starclimb" (exclusive of literals) is
|
||||
a comment.
|
||||
climbstar = /* [slash-asterisk]
|
||||
starclimb = */ [asterisk-slash]
|
||||
|
||||
/* this is a nested comment, by gum! */
|
||||
/*so is this*/
|
||||
|
||||
Also, REXX comments can span multiple records.
|
||||
|
||||
There can be no intervening character between the slash and asterisk (or
|
||||
the asterisk and slash). These two joined characters cannot be separated
|
||||
via a continued line, as in the manner of:
|
||||
|
||||
say 'If I were two─faced,' ,
|
||||
'would I be wearing this one?' ,
|
||||
' --- Abraham Lincoln'
|
||||
|
||||
Here comes the thingy that ends this REXX comment. ───┐
|
||||
│
|
||||
│
|
||||
↓
|
||||
|
||||
*/
|
||||
|
||||
hour = 12 /*high noon */
|
||||
midnight = 00 /*first hour of the day */
|
||||
suits = 1234 /*card suits: ♥ ♦ ♣ ♠ */
|
||||
|
||||
hutchHdr = '/*'
|
||||
hutchEnd = "*/"
|
||||
|
||||
/* the previous two "hutch" assignments aren't
|
||||
the start nor the end of a REXX comment. */
|
||||
|
||||
x=1000000 ** /*¡big power!*/ 1000
|
||||
|
||||
/*not a real good place for a comment (above),
|
||||
but essentially, a REXX comment can be
|
||||
anywhere whitespace is allowed. */
|
||||
|
|
|
|||
2
Task/Comments/REXX/comments-3.rexx
Normal file
2
Task/Comments/REXX/comments-3.rexx
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-- A REXX line comment (maybe)
|
||||
say "something" -- another line comment (maybe)
|
||||
Loading…
Add table
Add a link
Reference in a new issue