<html lang="en"> <head> <title>Informative block closing - Frequently asked questions about Octave (with answers)</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Frequently asked questions about Octave (with answers)"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Octave-Features.html#Octave-Features" title="Octave Features"> <link rel="prev" href="Line-continuation-by-backslash.html#Line-continuation-by-backslash" title="Line continuation by backslash"> <link rel="next" href="Coherent-syntax.html#Coherent-syntax" title="Coherent syntax"> <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="Informative-block-closing"></a> <p> Next: <a rel="next" accesskey="n" href="Coherent-syntax.html#Coherent-syntax">Coherent syntax</a>, Previous: <a rel="previous" accesskey="p" href="Line-continuation-by-backslash.html#Line-continuation-by-backslash">Line continuation by backslash</a>, Up: <a rel="up" accesskey="u" href="Octave-Features.html#Octave-Features">Octave Features</a> <hr> </div> <h3 class="section">5.5 Informative block closing</h3> <p>You may close <code>function</code>, <code>for</code>, <code>while</code>, <code>if</code>, <small class="dots">...</small> blocks with <code>endfunction</code>, <code>endfor</code>, <code>endwhile</code>, <small class="dots">...</small> keywords in addition to using <code>end</code>. As with <span class="sc">Matlab</span>, the <code>end</code> (or <code>endfunction</code>) keyword that marks the end of a function defined in a <samp><span class="file">.m</span></samp> file is optional. </body></html>