<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="/feed.php">
        <title>Documentation Center public:software:dazstudio:4:referenceguide:scripting:language_reference:comments</title>
        <description></description>
        <link>/</link>
        <image rdf:resource="/lib/tpl/dazdoccenter/images/favicon.ico" />
       <dc:date>2026-04-27T18:16:56+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="/public/software/dazstudio/4/referenceguide/scripting/language_reference/comments/start"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="/lib/tpl/dazdoccenter/images/favicon.ico">
        <title>Documentation Center</title>
        <link>/</link>
        <url>/lib/tpl/dazdoccenter/images/favicon.ico</url>
    </image>
    <item rdf:about="/public/software/dazstudio/4/referenceguide/scripting/language_reference/comments/start">
        <dc:format>text/html</dc:format>
        <dc:date>2012-03-11T22:57:29+00:00</dc:date>
        <title>Comments</title>
        <link>/public/software/dazstudio/4/referenceguide/scripting/language_reference/comments/start</link>
        <description>
&lt;h1 id=&quot;comments&quot;&gt;Comments&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;em&gt;Comments&lt;/em&gt; can be used to provide clarification of intent, make note of a particular position in the code that you want to come back to, prevent the interpreter from reading a portion of the code (e.g. debugging), or whatever other purpose you might think of. The underlying principal being, a comment is used to tell the interpreter to ignore something. Whether that something is simply text, or syntax, matters not.
&lt;/p&gt;

&lt;p&gt;
&lt;abbr title=&quot;Digital Art Zone&quot;&gt;DAZ&lt;/abbr&gt; Script supports two different styles of comments. One being a pair of slashes (//) followed by whatever is being commented. And the other being whatever is being commented, enclosed between an opposing pair of characters, each consisting of a slash and an asterisk (/* and */).
&lt;/p&gt;

&lt;p&gt;
The double slash (//) style is used for single-line comments. The comment begins at the double slash and continues until the end of the line.
&lt;/p&gt;

&lt;p&gt;
The slash/asterisk pair (/**/) style is used for multi-line comments, or in-line comments. The comment begins with the leading slash/asterisk, and continues until the opposite asterisk/slash. The double slash style can exist within the slash/asterisk pair, so it is recommended that the double slash style be used for general notes, and the slash/asterisk pair be used for debugging purposes, although it is entirely up to you to decide how you prefer to use them.
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&quot;examples&quot;&gt;Examples&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
An example of valid comments.
&lt;/p&gt;
&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// A single-line comment.&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; nLimit &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;// A single-line comment.&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* A multi-line comment
&amp;nbsp;
// This for loop is suspect for causing a problem.
// We take it out of the equation while investigating said problem.
&amp;nbsp;
for( var i = 0; i &amp;lt; nLimit; i++ ){
	// ...statements
}
*/&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Below is an in-line comment.&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// Notice that the semi-colon is outside the comment...&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// ...making this a valid statement for an undefined variable declaration&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; sTmp&lt;span class=&quot;coMULTI&quot;&gt;/* = &amp;quot;Temp&amp;quot;*/&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
An example of invalid comments. This produces an error, which is caused by attempting to nest the slash/asterisk pair style.
&lt;/p&gt;
&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;coMULTI&quot;&gt;/* A multi-line comment.
&amp;nbsp;
// This for loop is suspect for causing a problem.
// We take it out of the equation while investigating said problem.
&amp;nbsp;
/*This in-line comment will cause an error in the interpreter, because the following lines are interpreted as code.*/&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Notice that this loop is no longer commented...&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; nLimit&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;sy0&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// ...statements&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;*/&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;//&amp;lt;-- Notice this is no longer part of the comment.&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
</description>
    </item>
</rdf:RDF>
