Comment (computer programming): Difference between revisions

Content deleted Content added
Raku: Add Raku to scription section
Examples: Move powershell to scripting section
Line 367:
===Scripting===
 
A pattern in many [[scripting language]]s is to delimit a line comment with <code>#</code> and provide no support for a block comment. Notable languages include: [[Bash (Unix shell)|Bash]], [[Raku (programming language)|Raku]], [[Perl]], [[Windows PowerShell|PowerShell]], [[Python (programming language)|Python]] and [[R (programming language)|R]].
 
An example in R:
Line 423:
...
}
</syntaxhighlight>
 
====Block in PowerShell====
 
PowerShell supports a block comment delimited by <code><#</code> and <code>#></code>. For example:
 
<syntaxhighlight lang="powershell">
# Single line comment
<# Multi
Line
Comment #>
</syntaxhighlight>
 
Line 742 ⟶ 753:
 
}
</syntaxhighlight>
 
====PowerShell====
Comments in [[Windows PowerShell]]
 
<syntaxhighlight lang="powershell">
# Single line comment
Write-Host "Hello, World!"
 
<# Multi
Line
Comment #>
 
Write-Host "Goodbye, world!"
</syntaxhighlight>