Content deleted Content added
Stevebroshar (talk | contribs) →Scripting: Combine perl and raku |
Stevebroshar (talk | contribs) →Examples: Merge Ruby into scripting section |
||
Line 367:
===Scripting===
A pattern in many [[scripting language]]s is to delimit a line comment with <code>#</code> and
An example in R:
Line 374:
# This is a comment
print("This is not a comment") # This is another comment
</syntaxhighlight>▼
====Block in Ruby====▼
A block comment is delimited by <code>=begin</code> and <code>=end</code> that start a line. For example:
<syntaxhighlight lang="ruby">▼
# this is a comment▼
=begin▼
whatever goes in these lines▼
is just for the human reader▼
=end▼
</syntaxhighlight>
Line 753 ⟶ 767:
}
▲</syntaxhighlight>
▲====Ruby====
▲<syntaxhighlight lang="ruby">
▲puts "This is not a comment"
▲# this is a comment
▲puts "This is not a comment"
▲=begin
▲whatever goes in these lines
▲is just for the human reader
▲=end
▲puts "This is not a comment"
</syntaxhighlight>
|