User Tools

Site Tools


4rpl:commands:comment

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
4rpl:commands:comment [2021/01/19 13:47] – created Karsten754rpl:commands:comment [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 ===== Description ===== ===== Description =====
-Comments improve the legibility of code and assists in explaining complex pieces of code. + 
 +The # symbol will turn everything behind it on that line into a comment. Comments are not code, they do nothing. 
 + 
 +Comments can be used to temporarily disable lines of code, improve the legibility of code and assists in explaining complex pieces of code.  
 + 
 +A single line of code is automatically added when generating a new script, it displays the original name of the script and the current date and time.
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
-# This comment doesn't say very much +# --CoolScript-- 1/2/2021 5:42:27 PM 
-5 6 add # if this is not 11, I'm a walrus+ 
 +# This comment doesn't say very much: 
 +5 6 add ->value # if this is not 11, I'm a walrus 
 + 
 + 
 +# A temporarily disabled line of code: 
 +#SetUnitDebugText(self <-value) # test to make sure value is as expected
 </code> </code>
  
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
4rpl/commands/comment.1611064020.txt.gz · Last modified: 2025/02/14 14:56 (external edit)