2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -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:
* &nbsp; [[Documentation]]
* &nbsp; [[Here_document]]
;See also:
* &nbsp; [https://en.wikipedia.org/wiki/Comment_(computer_programming) Wikipedia]
* &nbsp; [http://xkcd.com/156 xkcd] (Humor: hand gesture denoting <code>//</code> for "commenting out" people.)
<br><br>

View file

@ -0,0 +1 @@
⍝ This is a comment

View 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
*/

View 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 *)
*)

View file

@ -0,0 +1 @@
display dialog "ok" #Starting in version 2.0, end-line comments can begin with a hash

View 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.

View file

@ -0,0 +1,4 @@
//single line comment
/*multiple line
comment*/

View file

@ -1,5 +1,4 @@
// This is a single-line comment
/* This is a comment
that spans multiple lines
and so on.

View file

@ -0,0 +1,10 @@
// a single-line comment
/* a multi-line
comment
*/
/*
* a multi-line comment
* with some decorative stars
*/

View file

@ -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 twofaced,' ,
'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.*/

View file

@ -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 twofaced,' ,
'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. */

View file

@ -0,0 +1,2 @@
-- A REXX line comment (maybe)
say "something" -- another line comment (maybe)