<doctitle>Scripting language syntax : comments and indentation</doctitle>
<docbody>
<hr>



<docsubtitle>Comments</docsubtitle>
<blockquote>
<p>
KVIrc supports comments in commands.<br>
A comment is like a 'normal command that is ignored' and starts
with a '#' character.
</p>
<example>
{
  # This is a comment , it occupies the whole line
  <a href="echo.kvihelp">echo</a> After the comment!; # This is an end-line comment
  # This is a comment too ; <a href="echo.kvihelp">echo</a> After the third comment!
  %var = test; # But this is the best one!; <a href="echo.kvihelp">echo</a> this is a %var
}
</example>
<p>
A comment is ALWAYS terminated by the ';' character or a newline.
You cannot 'escape' newlines or ';' characters in this case.
(or better: 'escape' characters have no meaning in comments...
maybe one day I will implement it).
</p>
<p>
Since I do not heavily use the comments when testing the scripting language,
if you get errors related with comments that KVIrc thinks that are in the wrong place,
well, just remove the comment (but before that, send me the script that caused
the error. I will fix it).
</p>
</blockquote>

<docsubtitle>Indentation</docsubtitle>
<blockquote>
<p>
You can use spaces or tabs to indent your code.
but please note that the command parameters should be separated by
space characters (ascii 32). Tabs are not granted to work as parameter separators.
</p>
<example>
{
&lt;tab&gt;echo Indented command
&lt;tab&gt;{
&lt;tab&gt;&lt;tab&gt;# Comment
&lt;tab&gt;&lt;tab&gt;echo Really Really long indented \
&lt;tab&gt;&lt;tab&gt;&lt;tab&gt;command
&lt;tab&gt;}
}
</example>
</blockquote>


<hr>
<a href="index.kvihelp">Main index</a> , <a href="syntax.kvihelp">Syntax index</a>
</docbody>


</docbody>

