Renamed "do..while" to "do-while" as it's more syntatically correct (inline with the java docs - oh no, sun taking over php!!)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@167012 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Aidan Lister 2004-08-22 15:36:09 +00:00
parent 8c3f2d80c0
commit 91ab5a49df

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.106 $ -->
<!-- $Revision: 1.107 $ -->
<chapter id="language.control-structures">
<title>Control Structures</title>
@ -308,13 +308,13 @@ endwhile;
</sect1>
<sect1 id="control-structures.do.while">
<title><literal>do..while</literal></title>
<title><literal>do-while</literal></title>
<simpara>
<literal>do..while</literal> loops are very similar to
<literal>do-while</literal> loops are very similar to
<literal>while</literal> loops, except the truth expression is
checked at the end of each iteration instead of in the beginning.
The main difference from regular <literal>while</literal> loops is
that the first iteration of a <literal>do..while</literal> loop is
that the first iteration of a <literal>do-while</literal> loop is
guaranteed to run (the truth expression is only checked at the end
of the iteration), whereas it's may not necessarily run with a
regular <literal>while</literal> loop (the truth expression is
@ -323,7 +323,7 @@ endwhile;
execution would end immediately).
</simpara>
<para>
There is just one syntax for <literal>do..while</literal> loops:
There is just one syntax for <literal>do-while</literal> loops:
<informalexample>
<programlisting role="php">
@ -346,9 +346,9 @@ do {
</simpara>
<para>
Advanced C users may be familiar with a different usage of the
<literal>do..while</literal> loop, to allow stopping execution in
<literal>do-while</literal> loop, to allow stopping execution in
the middle of code blocks, by encapsulating them with
<literal>do..while</literal> (0), and using the <link
<literal>do-while</literal> (0), and using the <link
linkend="control-structures.break"><literal>break</literal></link>
statement. The following code fragment demonstrates this:
<informalexample>
@ -680,7 +680,7 @@ foreach (array(1, 2, 3, 4, 5) as $v) {
<simpara>
<literal>break</literal> ends execution of the current
<literal>for</literal>, <literal>foreach</literal>,
<literal>while</literal>, <literal>do..while</literal> or
<literal>while</literal>, <literal>do-while</literal> or
<literal>switch</literal> structure.
</simpara>
<simpara>