Comments: Difference between revisions

1,523 bytes added ,  17 days ago
m
Remove FutureBasic apostrophe single line comment as it's deprecated
(→‎Insitux: inclusion)
m (Remove FutureBasic apostrophe single line comment as it's deprecated)
 
(13 intermediate revisions by 9 users not shown)
Line 18:
 
=={{header|11l}}==
<syntaxhighlight lang="11l"pre>// Single line comment
\\ Also single line comment (continuation of the comment in previous line)
 
Line 32:
 
\‘ And
this ’</syntaxhighlightpre>
 
=={{header|360 Assembly}}==
Line 559:
;(almost - you can still skip into it.) ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</syntaxhighlight>
 
=={{header|Binary Lambda Calculus}}==
 
BLC has no notion of comments, but since input is considered part of the program, one can always ignore the remainder of input, which can thus be arbitrary. Of course one can have comments in any language that translates to BLC, as discussed in https://rosettacode.org/wiki/Documentation#Binary_Lambda_Calculus
 
=={{header|Blast}}==
Line 582 ⟶ 586:
Line
Comment *#</syntaxhighlight>
 
=={{header|Bruijn}}==
Bruijn does not have multi-line comments.
<syntaxhighlight lang="bruijn"># This is a comment</syntaxhighlight>
 
=={{header|Brlcad}}==
Line 726 ⟶ 734:
<syntaxhighlight lang="lisp">(+ 1 (comment "foo") 3) ;; Throws an exception, because it tries to add nil to an integer
(+ 1 #_"foo" 3) ;; Returns 4</syntaxhighlight>
 
=={{header|CMake}}==
 
Line comments use the common <code>#</code> syntax:
 
<syntaxhighlight lang="cmake"># A single-line comment</syntaxhighlight>
 
Multi-line comments use a Lua-like square-bracket syntax.
 
<syntaxhighlight lang="cmake">
#[[A multi-line
comment ]]
' Single#[==[A multi-line comment
with [[nested brackets]]. ]==]</syntaxhighlight>
 
The number of equals signs (<code>=</code>) in the opening bracket determines the number expected in the closing bracket.
 
=={{header|COBOL}}==
Line 1,120 ⟶ 1,144:
# and last until the end of the line
</syntaxhighlight>
 
=={{header|Fennel}}==
<syntaxhighlight lang="fennel">; This is a single-line comment</syntaxhighlight>
 
=={{header|Fermat}}==
Line 1,241 ⟶ 1,268:
<syntaxhighlight lang="futurebasic">
// Single line comment
' Single line comment
rem Single line comment
/* Single line comment */
Line 1,691 ⟶ 1,717:
</syntaxhighlight>
 
As of 0.6.11, commentsComments allow characters designated as "Graphic" by Unicode, Spaces, and Private Use Area code points. Also, certain invisible "spaces," to make it easier to paste in international text (see langurlang.org). The idea around the "allowed" characters is to keep source code from having hidden text or codes and to allay confusion and deception.
 
=={{header|Lasso}}==
Line 1,949 ⟶ 1,975:
<syntaxhighlight lang="min">; this is a comment
1 1 + ; add one and one together</syntaxhighlight>
 
=={{header|MiniScript}}==
MiniScript just has one kind of comment. They begin with two slashes, and extend to the
end of a line. So you can put a comment either on a line by itself, or after a statement.
<syntaxhighlight lang="miniscript">// How many roads must a man walk down?
x = 6 * 7 // forty-two</syntaxhighlight>
 
=={{header|Mirah}}==
Line 2,253 ⟶ 2,285:
{{libheader|Phix/basics}}
Single line comment:
<!--<syntaxhighlight lang="phix">(phixonline)-->
<span style="color: #000080;font-style:italic;">-- Thisthis is a comment.
// this is also a comment. </span>
<!--</syntaxhighlight>-->
 
Line 2,274 ⟶ 2,307:
this is not a comment
</pre>
In fact there are now a total of six(!) different types of comment in Phix:
#! opening shebang
#[ .. #] for multiline shebangs
-- standard line comments
// C-style line comments
/* .. */ standard nestable multiline comments
--/* .. --*/ Euphoria-compatibility-style nestable multiline comments/code
 
=={{header|PHP}}==
Line 3,624 ⟶ 3,664:
 
=={{header|Wren}}==
<syntaxhighlight lang="ecmascriptwren">// This is a line comment.
/* This is a single line block comment.*/
/* This is
Line 3,630 ⟶ 3,670:
block comment.*/
/* This is/* a nested */block comment.*/</syntaxhighlight>
 
 
=={{header|X10}}==
Line 3,698 ⟶ 3,737:
Note: syntax depends on the assembler software but use of a semicolon is fairly standard. VASM and WinAPE use the semicolon.
<syntaxhighlight lang="z80"> ld hl,&8000 ;This is a comment</syntaxhighlight>
=={{header|zigZig}}==
<syntaxhighlight lang="zig">// This is a normal comment in Zig
/// This is a documentation comment in Zig (for the following line)</syntaxhighlight>
408

edits