<!--
* 
*
*  ProLinga-Doc
*
*  Copyright (C) 2002-2008 Xobas Software.
*  All rights reserved.
*  
*  This file is part of ProLinga-Doc.
*
*  ProLinga-Doc is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  ProLinga-Doc is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with ProLinga-Doc.  If not, see <http://www.gnu.org/licenses/>.
*
*  More information is available at the following addresses:
*
*  Website     : http://www.prolinga.org
*
*  Email       : prolinga-list@prolinga.org
*
*
-->
<refentry id="cmd_break">
  <refmeta>
    <refentrytitle>BREAK Command</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>BREAK</refname>
    <refpurpose>Transfer control out of a loop structure.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>BREAK</command>
  </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="cmd_break_introduction">
    <title>Introduction</title>
    <para>
      The <link linkend="cmd_break">BREAK</link> command terminates the current 
      <link linkend="cmd_for">FOR</link>, <link linkend="cmd_foreach">FOREACH</link> 
      or <link linkend="cmd_forever">FOREVER</link> loop and 
      continues processing the command that follows the <link linkend="cmd_endfor">ENDFOR</link> command.
    </para>
  </refsect1>

  <refsect1 id="cmd_break_arguments">
    <title>Arguments</title>
    <para>
      None.
    </para>
  </refsect1>

  <refsect1 id="cmd_break_example">
    <title>Example</title>
<programlisting>
. . .
. . .
FOREVER
    LET V-status = CALL GetNextOrder
    IF V-status = C-OK THEN
        BREAK
    ENDIF
    CALL ProcessOrder
ENDFOR
CALL TotalOrder
. . .
. . .
</programlisting>
  </refsect1>

  <refsect1 id="cmd_break_related">
    <title>Related Commands</title>
    <para>
      <link linkend="cmd_continue">CONTINUE</link>
      <link linkend="cmd_endfor">ENDFOR</link>
      <link linkend="cmd_for">FOR</link>
      <link linkend="cmd_foreach">FOREACH</link>
      <link linkend="cmd_forever">FOREVER</link>
    </para>
  </refsect1>

</refentry>

