<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'repeat until loop help' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'repeat until loop help' posted on the 'Pascal' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 09:52:39 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 09:52:39 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>repeat until loop help</title>
      <link>http://www.programmersheaven.com/mb/pasprog/429944/429944/repeat-until-loop-help/</link>
      <description>Im a beginner and i got a problem with repeat until loop&lt;br /&gt;
I want to know what exactly is supposed to happen in this little program :&lt;br /&gt;
&lt;br /&gt;
program looptest;&lt;br /&gt;
Uses Crt;&lt;br /&gt;
Var YN : String;&lt;br /&gt;
&lt;br /&gt;
Begin&lt;br /&gt;
 Writeln('Y(YES) or N(NO)?');&lt;br /&gt;
 Repeat {repeat the code for at least one time}&lt;br /&gt;
  YN := Readkey ;&lt;br /&gt;
  If YN = 'y' then Halt; {Halt - exit} &lt;br /&gt;
  If YN = 'n' then Writeln('Why not? Exiting...');&lt;br /&gt;
  Delay(1800); { wait a second plus 800 milliseconds }&lt;br /&gt;
 Until (YN = 'y') OR (YN = 'n');&lt;br /&gt;
End.&lt;br /&gt;
&lt;br /&gt;
thanks very much...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/429944/429944/repeat-until-loop-help/</guid>
      <pubDate>Fri, 26 Oct 2012 17:24:37 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: repeat until loop help</title>
      <link>http://www.programmersheaven.com/mb/pasprog/429944/429990/re-repeat-until-loop-help/#429990</link>
      <description>: Im a beginner and i got a problem with repeat until loop&lt;br /&gt;
: I want to know what exactly is supposed to happen in this little &lt;br /&gt;
: program :&lt;br /&gt;
: &lt;br /&gt;
: program looptest;&lt;br /&gt;
: Uses Crt;&lt;br /&gt;
: Var YN : String;&lt;br /&gt;
: &lt;br /&gt;
: Begin&lt;br /&gt;
:  Writeln('Y(YES) or N(NO)?');&lt;br /&gt;
:  Repeat {repeat the code for at least one time}&lt;br /&gt;
:   YN := Readkey ;&lt;br /&gt;
:   If YN = 'y' then Halt; {Halt - exit} &lt;br /&gt;
:   If YN = 'n' then Writeln('Why not? Exiting...');&lt;br /&gt;
:   Delay(1800); { wait a second plus 800 milliseconds }&lt;br /&gt;
:  Until (YN = 'y') OR (YN = 'n');&lt;br /&gt;
: End.&lt;br /&gt;
: &lt;br /&gt;
: thanks very much...&lt;br /&gt;
: &lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program looptest;
Uses Crt;
Var YN : String;

Begin
   Writeln('Y(YES) or N(NO)?');
   Repeat {repeat the code for at least one time}
      YN := Readkey ;
      If YN = 'y' then Halt; {Halt - exit} 
      If YN = 'n' then Writeln('Why not? Exiting...');
      Delay(1800); { wait a second plus 800 milliseconds }
   Until (YN = 'y') OR (YN = 'n');
End.
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
The program goes through the loop repeatedly until you hit either a lower case 'y' or a lower case 'n'.  If you hit 'y' the program ends immediately.  If you hit 'n' the program prints 'Why not? Exiting...', exits the loop and terminates anyway.  There is a 1.8 second delay each time through the loop.&lt;br /&gt;
&lt;br /&gt;
The &lt;strong&gt;Halt&lt;/strong&gt; exits the program immediately without going through the delay at the bottom of the loop. The other exit encounters the &lt;strong&gt;Delay&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Readkey&lt;/strong&gt; will wait for you to hit a key and need not be followed by hitting the Enter key.  If you do hit the Enter key it will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/429944/429990/re-repeat-until-loop-help/#429990</guid>
      <pubDate>Tue, 30 Oct 2012 00:34:37 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>