Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 3e60ff9d4d6f58c8fbd17208f14089fa > files > 371

octave-doc-3.2.3-3mdv2010.0.i586.rpm

<html lang="en">
<head>
<title>Single Line Comments - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Comments.html#Comments" title="Comments">
<link rel="next" href="Block-Comments.html#Block-Comments" title="Block Comments">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Single-Line-Comments"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Block-Comments.html#Block-Comments">Block Comments</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Comments.html#Comments">Comments</a>
<hr>
</div>

<h4 class="subsection">2.7.1 Single Line Comments</h4>

<p><a name="index-g_t_0040samp_007b_0023_007d-162"></a><a name="index-g_t_0040samp_007b_0025_007d-163"></a>
In the Octave language, a comment starts with either the sharp sign
character, &lsquo;<samp><span class="samp">#</span></samp>&rsquo;, or the percent symbol &lsquo;<samp><span class="samp">%</span></samp>&rsquo; and continues to the
end of the line.  Any text following the sharp sign or percent symbol is
ignored by the Octave interpreter and not executed.  The following example
shows whole line and partial line comments.
<pre class="example">     function countdown
       # Count down for main rocket engines
       disp(3);
       disp(2);
       disp(1);
       disp("Blast Off!");  # Rocket leaves pad
     endfunction
</pre>
   </body></html>