Editing
Squirrel Comments
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<div style="width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;">[https://sigwiki.potato.tf/index.php/Squirrel_Variables BACK]</div><div style="width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;">[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]</div><div style="width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;">[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types NEXT]</div> A comment is a human readable note which was inserted by a programmer to denote the what, how, or why behind code. Comments are ignored by the compiler and only serve to make the code easier to understand or use for programmers. Comments come in two flavors: single line and multi line comments. Single line comments go until they hit a new line character (\n). Multi line comments have a start and end token, anything between them is commented out. To insert a single line comment, prefix it with <code>'''//'''</code> or <code>'''#'''</code>. <syntaxhighlight lang="c#" line="1" start="1" style="font-weight:bold;> // I'm a comment that takes the whole line local darth_variable = 404 # I'm an inline comment </syntaxhighlight> To insert a multi line comment, use <code>'''/*'''</code> to start and <code>'''*/'''</code> to end. <syntaxhighlight lang="c" line="1" start="1" style="font-weight:bold;> /*I am a multi line comment */ local foo = 2; </syntaxhighlight> You can "nest" single line comments, but you can't do this with multi line comments <syntaxhighlight lang="c" line="1" start="1" style="font-weight:bold;> //////////////////////// okay /* // okay */ /* /* not okay */ */ </syntaxhighlight> The compiler will end the multi line comment at the first end token (*/) it sees, so the second one is outside of any comments and results in a compile error.
Summary:
Please note that all contributions to SigMod are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
SigMod:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
Edit source
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information