Difference between revisions of "Comments"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "A ''comment'' in programming jargon is a bit of free text for readers of the code, ignored by the compiler. Comments in MiniScript begin with two forward slashes (//) and con...")
 
m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
A ''comment'' in programming jargon is a bit of free text for readers of the code, ignored by the compiler.
 
A ''comment'' in programming jargon is a bit of free text for readers of the code, ignored by the compiler.
  
Comments in MiniScript begin with two forward slashes (//) and continue until the end of the line.
+
Comments in MiniScript begin with two forward slashes (<c>//</c>) and continue until the end of the line.
  
Example:
+
== Example ==
  
 
<source lang="miniscript">// Hello world program.  (This line is a comment.)
 
<source lang="miniscript">// Hello world program.  (This line is a comment.)
print "Hello world!"
+
print "Hello world!" // Greet the user.
 
// End of program (this line is also a comment).</source>
 
// End of program (this line is also a comment).</source>
  
 
[[Category:Language]]
 
[[Category:Language]]

Latest revision as of 03:53, 10 February 2020

A comment in programming jargon is a bit of free text for readers of the code, ignored by the compiler.

Comments in MiniScript begin with two forward slashes (//) and continue until the end of the line.

Example

// Hello world program.  (This line is a comment.)
print "Hello world!"  // Greet the user.
// End of program (this line is also a comment).