<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'crossword!!' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'crossword!!' posted on the 'Pascal' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 15:45:31 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 15:45:32 -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>crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/281520/crossword/</link>
      <description>i have some questions about crossword ~&lt;br /&gt;
\Please help me!&lt;br /&gt;
&lt;br /&gt;
1) How to set the background colour and text colour in pascal??&lt;br /&gt;
&lt;br /&gt;
2) I want to know does pascal has this function??&lt;br /&gt;
   if i input the right answer in the game &lt;br /&gt;
   then the colour of text will change to another colour~~&lt;br /&gt;
   How can do this??&lt;br /&gt;
&lt;br /&gt;
Suggest the simplest way to me~&lt;br /&gt;
THZ~&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/281520/crossword/</guid>
      <pubDate>Tue, 16 Nov 2004 03:53:14 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/281521/re-crossword/#281521</link>
      <description>: i have some questions about crossword ~&lt;br /&gt;
: \Please help me!&lt;br /&gt;
: &lt;br /&gt;
: 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: &lt;br /&gt;
: 2) I want to know does pascal has this function??&lt;br /&gt;
:    if i input the right answer in the game &lt;br /&gt;
:    then the colour of text will change to another colour~~&lt;br /&gt;
:    How can do this??&lt;br /&gt;
: &lt;br /&gt;
: Suggest the simplest way to me~&lt;br /&gt;
: THZ~&lt;br /&gt;
: &lt;br /&gt;
1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
&lt;br /&gt;
2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/281521/re-crossword/#281521</guid>
      <pubDate>Tue, 16 Nov 2004 04:12:50 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/281523/re-crossword/#281523</link>
      <description>: : i have some questions about crossword ~&lt;br /&gt;
: : \Please help me!&lt;br /&gt;
: : &lt;br /&gt;
: : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : &lt;br /&gt;
: : 2) I want to know does pascal has this function??&lt;br /&gt;
: :    if i input the right answer in the game &lt;br /&gt;
: :    then the colour of text will change to another colour~~&lt;br /&gt;
: :    How can do this??&lt;br /&gt;
: : &lt;br /&gt;
: : Suggest the simplest way to me~&lt;br /&gt;
: : THZ~&lt;br /&gt;
: : &lt;br /&gt;
: 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: &lt;br /&gt;
: 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: &lt;br /&gt;
THX~&lt;br /&gt;
BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/281523/re-crossword/#281523</guid>
      <pubDate>Tue, 16 Nov 2004 04:22:44 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/281526/re-crossword/#281526</link>
      <description>: : : i have some questions about crossword ~&lt;br /&gt;
: : : \Please help me!&lt;br /&gt;
: : : &lt;br /&gt;
: : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : &lt;br /&gt;
: : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : :    if i input the right answer in the game &lt;br /&gt;
: : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : :    How can do this??&lt;br /&gt;
: : : &lt;br /&gt;
: : : Suggest the simplest way to me~&lt;br /&gt;
: : : THZ~&lt;br /&gt;
: : : &lt;br /&gt;
: : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : &lt;br /&gt;
: : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : &lt;br /&gt;
: THX~&lt;br /&gt;
: BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/281526/re-crossword/#281526</guid>
      <pubDate>Tue, 16 Nov 2004 04:40:20 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/281998/re-crossword/#281998</link>
      <description>: : : : i have some questions about crossword ~&lt;br /&gt;
: : : : \Please help me!&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : :    if i input the right answer in the game &lt;br /&gt;
: : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : :    How can do this??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : THZ~&lt;br /&gt;
: : : : &lt;br /&gt;
: : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : &lt;br /&gt;
: : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : &lt;br /&gt;
: : THX~&lt;br /&gt;
: : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: &lt;br /&gt;
OK!The problem has been solved.&lt;br /&gt;
&lt;br /&gt;
2)I think this method is not suitable in my idea.&lt;br /&gt;
  My idea is like that:&lt;br /&gt;
  I had set a display with many letters for the player to choose them.&lt;br /&gt;
  If they choose a right letter, it will change colour.&lt;br /&gt;
&lt;br /&gt;
Any other method??&lt;br /&gt;
&lt;br /&gt;
3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/281998/re-crossword/#281998</guid>
      <pubDate>Fri, 19 Nov 2004 10:39:10 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282013/re-crossword/#282013</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : \Please help me!&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : :    How can do this??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : THZ~&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : THX~&lt;br /&gt;
: : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : &lt;br /&gt;
: OK!The problem has been solved.&lt;br /&gt;
: &lt;br /&gt;
: 2)I think this method is not suitable in my idea.&lt;br /&gt;
:   My idea is like that:&lt;br /&gt;
:   I had set a display with many letters for the player to choose them.&lt;br /&gt;
:   If they choose a right letter, it will change colour.&lt;br /&gt;
: &lt;br /&gt;
: Any other method??&lt;br /&gt;
: &lt;br /&gt;
: 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
&lt;br /&gt;
3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
function TimeInMin: Word;
var
  Hour, Minutes, Seconds, HSeconds: word;
begin
  GetTime(Hour, Minutes, Seconds, HSeconds);
  TimeInMin := Hour*60+Minutes;
end;

var
  GameFinished: boolean;
{ program part }
  GameStartTime := TimeInMin;
  GameFinished := false;

  repeat

    { Do Game }
    { Do not use read() or readln(), because those have their own waiting routine }
    { but readkey() and keypressed() instead }
    { If the player successfully finishes the game set the GameFinished to true }
    { If you want to let the player know how much time is left: }
    { write the following result somewhere: 30-(TimeInMin-GameStart) }

  until (TimeInMin = GameStartTime+30) or GameFinished;

  if GameFinished then
    PlayerHasWon
  else
    PlayerHasLost;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282013/re-crossword/#282013</guid>
      <pubDate>Fri, 19 Nov 2004 12:49:33 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282071/re-crossword/#282071</link>
      <description>: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : \Please help me!&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : :    How can do this??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : THZ~&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : THX~&lt;br /&gt;
: : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : &lt;br /&gt;
: : OK!The problem has been solved.&lt;br /&gt;
: : &lt;br /&gt;
: : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: :   My idea is like that:&lt;br /&gt;
: :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : &lt;br /&gt;
: : Any other method??&lt;br /&gt;
: : &lt;br /&gt;
: : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: &lt;br /&gt;
: 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: function TimeInMin: Word;
: var
:   Hour, Minutes, Seconds, HSeconds: word;
: begin
:   GetTime(Hour, Minutes, Seconds, HSeconds);
:   TimeInMin := Hour*60+Minutes;
: end;
: 
: var
:   GameFinished: boolean;
: { program part }
:   GameStartTime := TimeInMin;
:   GameFinished := false;
: 
:   repeat
: 
:     { Do Game }
:     { Do not use read() or readln(), because those have their own waiting routine }
:     { but readkey() and keypressed() instead }
:     { If the player successfully finishes the game set the GameFinished to true }
:     { If you want to let the player know how much time is left: }
:     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: 
:   until (TimeInMin = GameStartTime+30) or GameFinished;
: 
:   if GameFinished then
:     PlayerHasWon
:   else
:     PlayerHasLost;
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
Thank you.&lt;br /&gt;
But it said GetTime is a unknown identifier.&lt;br /&gt;
what should it set?&lt;br /&gt;
uses crt ??uses Doc or something else??&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282071/re-crossword/#282071</guid>
      <pubDate>Sat, 20 Nov 2004 06:15:37 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282072/re-crossword/#282072</link>
      <description>: : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : THZ~&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : THX~&lt;br /&gt;
: : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : OK!The problem has been solved.&lt;br /&gt;
: : : &lt;br /&gt;
: : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : :   My idea is like that:&lt;br /&gt;
: : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : &lt;br /&gt;
: : : Any other method??&lt;br /&gt;
: : : &lt;br /&gt;
: : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : &lt;br /&gt;
: : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: : function TimeInMin: Word;
: : var
: :   Hour, Minutes, Seconds, HSeconds: word;
: : begin
: :   GetTime(Hour, Minutes, Seconds, HSeconds);
: :   TimeInMin := Hour*60+Minutes;
: : end;
: : 
: : var
: :   GameFinished: boolean;
: : { program part }
: :   GameStartTime := TimeInMin;
: :   GameFinished := false;
: : 
: :   repeat
: : 
: :     { Do Game }
: :     { Do not use read() or readln(), because those have their own waiting routine }
: :     { but readkey() and keypressed() instead }
: :     { If the player successfully finishes the game set the GameFinished to true }
: :     { If you want to let the player know how much time is left: }
: :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : 
: :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : 
: :   if GameFinished then
: :     PlayerHasWon
: :   else
: :     PlayerHasLost;
: : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: Thank you.&lt;br /&gt;
: But it said GetTime is a unknown identifier.&lt;br /&gt;
: what should it set?&lt;br /&gt;
: uses crt ??uses Doc or something else??&lt;br /&gt;
: &lt;br /&gt;
GetTime() is part of the Crt unit. This kind of questions can also be answered by looking the function up in the help files. It lists the unit and also the precise description and declaration.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282072/re-crossword/#282072</guid>
      <pubDate>Sat, 20 Nov 2004 06:30:17 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282126/re-crossword/#282126</link>
      <description>: : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : THX~&lt;br /&gt;
: : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : OK!The problem has been solved.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : :   My idea is like that:&lt;br /&gt;
: : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : Any other method??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : : &lt;br /&gt;
: : : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : : &lt;pre class="sourcecode"&gt;
: : : function TimeInMin: Word;
: : : var
: : :   Hour, Minutes, Seconds, HSeconds: word;
: : : begin
: : :   GetTime(Hour, Minutes, Seconds, HSeconds);
: : :   TimeInMin := Hour*60+Minutes;
: : : end;
: : : 
: : : var
: : :   GameFinished: boolean;
: : : { program part }
: : :   GameStartTime := TimeInMin;
: : :   GameFinished := false;
: : : 
: : :   repeat
: : : 
: : :     { Do Game }
: : :     { Do not use read() or readln(), because those have their own waiting routine }
: : :     { but readkey() and keypressed() instead }
: : :     { If the player successfully finishes the game set the GameFinished to true }
: : :     { If you want to let the player know how much time is left: }
: : :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : : 
: : :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : : 
: : :   if GameFinished then
: : :     PlayerHasWon
: : :   else
: : :     PlayerHasLost;
: : : &lt;/pre&gt;&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : Thank you.&lt;br /&gt;
: : But it said GetTime is a unknown identifier.&lt;br /&gt;
: : what should it set?&lt;br /&gt;
: : uses crt ??uses Doc or something else??&lt;br /&gt;
: : &lt;br /&gt;
: GetTime() is part of the Crt unit. This kind of questions can also be answered by looking the function up in the help files. It lists the unit and also the precise description and declaration.&lt;br /&gt;
: &lt;br /&gt;
I can't do it .Can you make a sample to me??&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282126/re-crossword/#282126</guid>
      <pubDate>Sat, 20 Nov 2004 19:16:29 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282136/re-crossword/#282136</link>
      <description>: : : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : THX~&lt;br /&gt;
: : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : :   My idea is like that:&lt;br /&gt;
: : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Any other method??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : : : &lt;pre class="sourcecode"&gt;
: : : : function TimeInMin: Word;
: : : : var
: : : :   Hour, Minutes, Seconds, HSeconds: word;
: : : : begin
: : : :   GetTime(Hour, Minutes, Seconds, HSeconds);
: : : :   TimeInMin := Hour*60+Minutes;
: : : : end;
: : : : 
: : : : var
: : : :   GameFinished: boolean;
: : : : { program part }
: : : :   GameStartTime := TimeInMin;
: : : :   GameFinished := false;
: : : : 
: : : :   repeat
: : : : 
: : : :     { Do Game }
: : : :     { Do not use read() or readln(), because those have their own waiting routine }
: : : :     { but readkey() and keypressed() instead }
: : : :     { If the player successfully finishes the game set the GameFinished to true }
: : : :     { If you want to let the player know how much time is left: }
: : : :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : : : 
: : : :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : : : 
: : : :   if GameFinished then
: : : :     PlayerHasWon
: : : :   else
: : : :     PlayerHasLost;
: : : : &lt;/pre&gt;&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : Thank you.&lt;br /&gt;
: : : But it said GetTime is a unknown identifier.&lt;br /&gt;
: : : what should it set?&lt;br /&gt;
: : : uses crt ??uses Doc or something else??&lt;br /&gt;
: : : &lt;br /&gt;
: : GetTime() is part of the Crt unit. This kind of questions can also be answered by looking the function up in the help files. It lists the unit and also the precise description and declaration.&lt;br /&gt;
: : &lt;br /&gt;
: I can't do it .Can you make a sample to me??&lt;br /&gt;
: &lt;br /&gt;
Here is a sample, which asks you to type a word in 3 minutes:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
uses Crt;

function TimeInMin: Word;
var
  Hour, Minutes, Seconds, HSeconds: word;
begin
  GetTime(Hour, Minutes, Seconds, HSeconds);
  TimeInMin := Hour*60+Minutes;
end;

var
  GameFinished: boolean;
  TypedWord: string;
  ch: char;
begin
  GameStartTime := TimeInMin;
  GameFinished := false;
  TypedWord := '';
  GotoXY(1,1); write('Enter word: ');
  repeat
    if Keypressed then
    begin
      ch := readkey;
      case ch of
        #8 {Backspace}: Delete(TypedWord, Length(TypedWord), 1);
        #13 {Enter}: GameFinished := true; {end game}
        #0 {Extended char}: ch := readkey; {clear buffer}
        #1..#7,#9..#12,#14..#19 {system commands}: begin end; {ignore}
        else TypedWord := TypedWord + ch;
      end;
      GotoXY(1,1); write('Enter word: ', TypedWord);
    end;
  until (TimeInMin = GameStartTime+3) or GameFinished;

  if GameFinished then 
  begin
    if TypedWord = 'This is an example game' then
      writeln('You typed the correct word.')
    else
      writeln('You typed an incorrect word.')
  end else
    writeln('You did not type fast enough');
  readln;
end.
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282136/re-crossword/#282136</guid>
      <pubDate>Sun, 21 Nov 2004 01:23:05 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282141/re-crossword/#282141</link>
      <description>: : : : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : THX~&lt;br /&gt;
: : : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : : :   My idea is like that:&lt;br /&gt;
: : : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Any other method??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : : : : &lt;pre class="sourcecode"&gt;
: : : : : function TimeInMin: Word;
: : : : : var
: : : : :   Hour, Minutes, Seconds, HSeconds: word;
: : : : : begin
: : : : :   GetTime(Hour, Minutes, Seconds, HSeconds);
: : : : :   TimeInMin := Hour*60+Minutes;
: : : : : end;
: : : : : 
: : : : : var
: : : : :   GameFinished: boolean;
: : : : : { program part }
: : : : :   GameStartTime := TimeInMin;
: : : : :   GameFinished := false;
: : : : : 
: : : : :   repeat
: : : : : 
: : : : :     { Do Game }
: : : : :     { Do not use read() or readln(), because those have their own waiting routine }
: : : : :     { but readkey() and keypressed() instead }
: : : : :     { If the player successfully finishes the game set the GameFinished to true }
: : : : :     { If you want to let the player know how much time is left: }
: : : : :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : : : : 
: : : : :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : : : : 
: : : : :   if GameFinished then
: : : : :     PlayerHasWon
: : : : :   else
: : : : :     PlayerHasLost;
: : : : : &lt;/pre&gt;&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : Thank you.&lt;br /&gt;
: : : : But it said GetTime is a unknown identifier.&lt;br /&gt;
: : : : what should it set?&lt;br /&gt;
: : : : uses crt ??uses Doc or something else??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : GetTime() is part of the Crt unit. This kind of questions can also be answered by looking the function up in the help files. It lists the unit and also the precise description and declaration.&lt;br /&gt;
: : : &lt;br /&gt;
: : I can't do it .Can you make a sample to me??&lt;br /&gt;
: : &lt;br /&gt;
: Here is a sample, which asks you to type a word in 3 minutes:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: uses Crt;
: 
: function TimeInMin: Word;
: var
:   Hour, Minutes, Seconds, HSeconds: word;
: begin
:   GetTime(Hour, Minutes, Seconds, HSeconds);
:   TimeInMin := Hour*60+Minutes;
: end;
: 
: var
:   GameFinished: boolean;
:   TypedWord: string;
:   ch: char;
: begin
:   GameStartTime := TimeInMin;
:   GameFinished := false;
:   TypedWord := '';
:   GotoXY(1,1); write('Enter word: ');
:   repeat
:     if Keypressed then
:     begin
:       ch := readkey;
:       case ch of
:         #8 {Backspace}: Delete(TypedWord, Length(TypedWord), 1);
:         #13 {Enter}: GameFinished := true; {end game}
:         #0 {Extended char}: ch := readkey; {clear buffer}
:         #1..#7,#9..#12,#14..#19 {system commands}: begin end; {ignore}
:         else TypedWord := TypedWord + ch;
:       end;
:       GotoXY(1,1); write('Enter word: ', TypedWord);
:     end;
:   until (TimeInMin = GameStartTime+3) or GameFinished;
: 
:   if GameFinished then 
:   begin
:     if TypedWord = 'This is an example game' then
:       writeln('You typed the correct word.')
:     else
:       writeln('You typed an incorrect word.')
:   end else
:     writeln('You did not type fast enough');
:   readln;
: end.
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
THX!!!!&lt;br /&gt;
  { If you want to let the player know how much time is left: }&lt;br /&gt;
    { write the following result somewhere: 30-(TimeInMin-GameStart) }&lt;br /&gt;
How about this??&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282141/re-crossword/#282141</guid>
      <pubDate>Sun, 21 Nov 2004 03:01:40 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282143/re-crossword/#282143</link>
      <description>: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : \Please help me!&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : :    How can do this??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : THZ~&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : THX~&lt;br /&gt;
: : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : &lt;br /&gt;
: : OK!The problem has been solved.&lt;br /&gt;
: : &lt;br /&gt;
: : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: :   My idea is like that:&lt;br /&gt;
: :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : &lt;br /&gt;
: : Any other method??&lt;br /&gt;
: : &lt;br /&gt;
: : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: &lt;br /&gt;
: 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: function TimeInMin: Word;
: var
:   Hour, Minutes, Seconds, HSeconds: word;
: begin
:   GetTime(Hour, Minutes, Seconds, HSeconds);
:   TimeInMin := Hour*60+Minutes;
: end;
: 
: var
:   GameFinished: boolean;
: { program part }
:   GameStartTime := TimeInMin;
:   GameFinished := false;
: 
:   repeat
: 
:     { Do Game }
:     { Do not use read() or readln(), because those have their own waiting routine }
:     { but readkey() and keypressed() instead }
:     { If the player successfully finishes the game set the GameFinished to true }
:     { If you want to let the player know how much time is left: }
:     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: 
:   until (TimeInMin = GameStartTime+30) or GameFinished;
: 
:   if GameFinished then
:     PlayerHasWon
:   else
:     PlayerHasLost;
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
That can be inserted any where in the loop:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  GotoXY(1,2);
  write('Time left: ', 3-(TimeInMin-GameStart));
&lt;/pre&gt;&lt;br /&gt;
This code will cause flickering of the time left. A better way is to check if the time left is changed since the last writing of it, which involves a simple if-then and storing the value of time left after writing it.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282143/re-crossword/#282143</guid>
      <pubDate>Sun, 21 Nov 2004 04:08:10 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282514/re-crossword/#282514</link>
      <description>I don't know how to do it, but can you me the program .  I'd like to &lt;br /&gt;
play it&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282514/re-crossword/#282514</guid>
      <pubDate>Wed, 24 Nov 2004 01:49:19 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282858/re-crossword/#282858</link>
      <description>: : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : THZ~&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : THX~&lt;br /&gt;
: : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : OK!The problem has been solved.&lt;br /&gt;
: : : &lt;br /&gt;
: : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : :   My idea is like that:&lt;br /&gt;
: : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : &lt;br /&gt;
: : : Any other method??&lt;br /&gt;
: : : &lt;br /&gt;
: : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : &lt;br /&gt;
: : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: : function TimeInMin: Word;
: : var
: :   Hour, Minutes, Seconds, HSeconds: word;
: : begin
: :   GetTime(Hour, Minutes, Seconds, HSeconds);
: :   TimeInMin := Hour*60+Minutes;
: : end;
: : 
: : var
: :   GameFinished: boolean;
: : { program part }
: :   GameStartTime := TimeInMin;
: :   GameFinished := false;
: : 
: :   repeat
: : 
: :     { Do Game }
: :     { Do not use read() or readln(), because those have their own waiting routine }
: :     { but readkey() and keypressed() instead }
: :     { If the player successfully finishes the game set the GameFinished to true }
: :     { If you want to let the player know how much time is left: }
: :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : 
: :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : 
: :   if GameFinished then
: :     PlayerHasWon
: :   else
: :     PlayerHasLost;
: : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: That can be inserted any where in the loop:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
:   GotoXY(1,2);
:   write('Time left: ', 3-(TimeInMin-GameStart));
: &lt;/pre&gt;&lt;br /&gt;
: This code will cause flickering of the time left. A better way is to check if the time left is changed since the last writing of it, which involves a simple if-then and storing the value of time left after writing it.&lt;br /&gt;
: &lt;br /&gt;
I can't play the timer and main program at the same time ~&lt;br /&gt;
Maybe some program formed&lt;br /&gt;
Can you help me to see~?&lt;br /&gt;
My program:&lt;br /&gt;
repeat&lt;br /&gt;
GotoXY(1,2);&lt;br /&gt;
write('Time left: ', 3-(TimeInMin-GameStart));&lt;br /&gt;
&lt;br /&gt;
repeat&lt;br /&gt;
ans 1 &lt;br /&gt;
until XXXXX&lt;br /&gt;
&lt;br /&gt;
repeat&lt;br /&gt;
ans 2&lt;br /&gt;
until XXXXX&lt;br /&gt;
&lt;br /&gt;
 repeat&lt;br /&gt;
ans 3&lt;br /&gt;
until XXX&lt;br /&gt;
&lt;br /&gt;
until &lt;br /&gt;
(TimeInMin = GameStartTime+3) or GameFinished;&lt;br /&gt;
write('You are loss);&lt;br /&gt;
&lt;br /&gt;
it can't work~&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282858/re-crossword/#282858</guid>
      <pubDate>Fri, 26 Nov 2004 21:35:15 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/282916/re-crossword/#282916</link>
      <description>: : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : THX~&lt;br /&gt;
: : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : OK!The problem has been solved.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : :   My idea is like that:&lt;br /&gt;
: : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : Any other method??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : : &lt;br /&gt;
: : : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : : &lt;pre class="sourcecode"&gt;
: : : function TimeInMin: Word;
: : : var
: : :   Hour, Minutes, Seconds, HSeconds: word;
: : : begin
: : :   GetTime(Hour, Minutes, Seconds, HSeconds);
: : :   TimeInMin := Hour*60+Minutes;
: : : end;
: : : 
: : : var
: : :   GameFinished: boolean;
: : : { program part }
: : :   GameStartTime := TimeInMin;
: : :   GameFinished := false;
: : : 
: : :   repeat
: : : 
: : :     { Do Game }
: : :     { Do not use read() or readln(), because those have their own waiting routine }
: : :     { but readkey() and keypressed() instead }
: : :     { If the player successfully finishes the game set the GameFinished to true }
: : :     { If you want to let the player know how much time is left: }
: : :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : : 
: : :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : : 
: : :   if GameFinished then
: : :     PlayerHasWon
: : :   else
: : :     PlayerHasLost;
: : : &lt;/pre&gt;&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : That can be inserted any where in the loop:&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: :   GotoXY(1,2);
: :   write('Time left: ', 3-(TimeInMin-GameStart));
: : &lt;/pre&gt;&lt;br /&gt;
: : This code will cause flickering of the time left. A better way is to check if the time left is changed since the last writing of it, which involves a simple if-then and storing the value of time left after writing it.&lt;br /&gt;
: : &lt;br /&gt;
: I can't play the timer and main program at the same time ~&lt;br /&gt;
: Maybe some program formed&lt;br /&gt;
: Can you help me to see~?&lt;br /&gt;
: My program:&lt;br /&gt;
: repeat&lt;br /&gt;
: GotoXY(1,2);&lt;br /&gt;
: write('Time left: ', 3-(TimeInMin-GameStart));&lt;br /&gt;
: &lt;br /&gt;
: repeat&lt;br /&gt;
: ans 1 &lt;br /&gt;
: until XXXXX&lt;br /&gt;
: &lt;br /&gt;
: repeat&lt;br /&gt;
: ans 2&lt;br /&gt;
: until XXXXX&lt;br /&gt;
: &lt;br /&gt;
:  repeat&lt;br /&gt;
: ans 3&lt;br /&gt;
: until XXX&lt;br /&gt;
: &lt;br /&gt;
: until &lt;br /&gt;
: (TimeInMin = GameStartTime+3) or GameFinished;&lt;br /&gt;
: write('You are loss);&lt;br /&gt;
: &lt;br /&gt;
: it can't work~&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
There is only 1 repeat-until loop:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  repeat
    GotoXY(1,2);
    write('Time left: ', 3-(TimeInMin-GameStart));
    ans 1 
    ans 2
    ans 3
  until 
    (TimeInMin = GameStartTime+3) or GameFinished;
  write('You are loss);
&lt;/pre&gt;&lt;br /&gt;
If you want to indicate a wrong answer, you need to add a boolean variable to the game. This variable can also be used to finish the loop.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/282916/re-crossword/#282916</guid>
      <pubDate>Sat, 27 Nov 2004 10:46:22 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/286171/re-crossword/#286171</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2004-12-22 8:37:46&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : THX~&lt;br /&gt;
: : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : :   My idea is like that:&lt;br /&gt;
: : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Any other method??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : : : &lt;pre class="sourcecode"&gt;
: : : : function TimeInMin: Word;
: : : : var
: : : :   Hour, Minutes, Seconds, HSeconds: word;
: : : : begin
: : : :   GetTime(Hour, Minutes, Seconds, HSeconds);
: : : :   TimeInMin := Hour*60+Minutes;
: : : : end;
: : : : 
: : : : var
: : : :   GameFinished: boolean;
: : : : { program part }
: : : :   GameStartTime := TimeInMin;
: : : :   GameFinished := false;
: : : : 
: : : :   repeat
: : : : 
: : : :     { Do Game }
: : : :     { Do not use read() or readln(), because those have their own waiting routine }
: : : :     { but readkey() and keypressed() instead }
: : : :     { If the player successfully finishes the game set the GameFinished to true }
: : : :     { If you want to let the player know how much time is left: }
: : : :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : : : 
: : : :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : : : 
: : : :   if GameFinished then
: : : :     PlayerHasWon
: : : :   else
: : : :     PlayerHasLost;
: : : : &lt;/pre&gt;&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : That can be inserted any where in the loop:&lt;br /&gt;
: : : &lt;pre class="sourcecode"&gt;
: : :   GotoXY(1,2);
: : :   write('Time left: ', 3-(TimeInMin-GameStart));
: : : &lt;/pre&gt;&lt;br /&gt;
: : : This code will cause flickering of the time left. A better way is to check if the time left is changed since the last writing of it, which involves a simple if-then and storing the value of time left after writing it.&lt;br /&gt;
: : : &lt;br /&gt;
: : I can't play the timer and main program at the same time ~&lt;br /&gt;
: : Maybe some program formed&lt;br /&gt;
: : Can you help me to see~?&lt;br /&gt;
: : My program:&lt;br /&gt;
: : repeat&lt;br /&gt;
: : GotoXY(1,2);&lt;br /&gt;
: : write('Time left: ', 3-(TimeInMin-GameStart));&lt;br /&gt;
: : &lt;br /&gt;
: : repeat&lt;br /&gt;
: : ans 1 &lt;br /&gt;
: : until XXXXX&lt;br /&gt;
: : &lt;br /&gt;
: : repeat&lt;br /&gt;
: : ans 2&lt;br /&gt;
: : until XXXXX&lt;br /&gt;
: : &lt;br /&gt;
: :  repeat&lt;br /&gt;
: : ans 3&lt;br /&gt;
: : until XXX&lt;br /&gt;
: : &lt;br /&gt;
: : until &lt;br /&gt;
: : (TimeInMin = GameStartTime+3) or GameFinished;&lt;br /&gt;
: : write('You are loss);&lt;br /&gt;
: : &lt;br /&gt;
: : it can't work~&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: There is only 1 repeat-until loop:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
:   repeat
:     GotoXY(1,2);
:     write('Time left: ', 3-(TimeInMin-GameStart));
:     ans 1 
:     ans 2
:     ans 3
:   until 
:     (TimeInMin = GameStartTime+3) or GameFinished;
:   write('You are loss);
: &lt;/pre&gt;&lt;br /&gt;
: If you want to indicate a wrong answer, you need to add a boolean variable to the game. This variable can also be used to finish the loop.&lt;br /&gt;
: &lt;br /&gt;
I stil cant do this!!&lt;br /&gt;
&amp;gt;&amp;lt;"&lt;br /&gt;
I think you misunderstand my program~&lt;br /&gt;
My program is check the letter of the answer one by one ,&lt;br /&gt;
not check the complete answer one by one.&lt;br /&gt;
By similiar&lt;br /&gt;
if the answer is 'Food'&lt;br /&gt;
The player first input the first letter of his answer&lt;br /&gt;
then I check it .&lt;br /&gt;
if his  lettter is incorrect , he will input it again until the letter is 'F' ,then he can input the second letter.&lt;br /&gt;
Therefore ,many repeat loop must be used , then how can I add the timer in it??&lt;br /&gt;
&lt;br /&gt;
Sorry, my expreesion is not clear,&lt;br /&gt;
hope that you can solve my program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/286171/re-crossword/#286171</guid>
      <pubDate>Wed, 22 Dec 2004 08:37:03 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/286182/re-crossword/#286182</link>
      <description>: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2004-12-22 8:37:46&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by zibadian at  2004-11-19 12:49:51&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : THX~&lt;br /&gt;
: : : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : : :   My idea is like that:&lt;br /&gt;
: : : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Any other method??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:&lt;br /&gt;
: : : : : &lt;pre class="sourcecode"&gt;
: : : : : function TimeInMin: Word;
: : : : : var
: : : : :   Hour, Minutes, Seconds, HSeconds: word;
: : : : : begin
: : : : :   GetTime(Hour, Minutes, Seconds, HSeconds);
: : : : :   TimeInMin := Hour*60+Minutes;
: : : : : end;
: : : : : 
: : : : : var
: : : : :   GameFinished: boolean;
: : : : : { program part }
: : : : :   GameStartTime := TimeInMin;
: : : : :   GameFinished := false;
: : : : : 
: : : : :   repeat
: : : : : 
: : : : :     { Do Game }
: : : : :     { Do not use read() or readln(), because those have their own waiting routine }
: : : : :     { but readkey() and keypressed() instead }
: : : : :     { If the player successfully finishes the game set the GameFinished to true }
: : : : :     { If you want to let the player know how much time is left: }
: : : : :     { write the following result somewhere: 30-(TimeInMin-GameStart) }
: : : : : 
: : : : :   until (TimeInMin = GameStartTime+30) or GameFinished;
: : : : : 
: : : : :   if GameFinished then
: : : : :     PlayerHasWon
: : : : :   else
: : : : :     PlayerHasLost;
: : : : : &lt;/pre&gt;&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : That can be inserted any where in the loop:&lt;br /&gt;
: : : : &lt;pre class="sourcecode"&gt;
: : : :   GotoXY(1,2);
: : : :   write('Time left: ', 3-(TimeInMin-GameStart));
: : : : &lt;/pre&gt;&lt;br /&gt;
: : : : This code will cause flickering of the time left. A better way is to check if the time left is changed since the last writing of it, which involves a simple if-then and storing the value of time left after writing it.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : I can't play the timer and main program at the same time ~&lt;br /&gt;
: : : Maybe some program formed&lt;br /&gt;
: : : Can you help me to see~?&lt;br /&gt;
: : : My program:&lt;br /&gt;
: : : repeat&lt;br /&gt;
: : : GotoXY(1,2);&lt;br /&gt;
: : : write('Time left: ', 3-(TimeInMin-GameStart));&lt;br /&gt;
: : : &lt;br /&gt;
: : : repeat&lt;br /&gt;
: : : ans 1 &lt;br /&gt;
: : : until XXXXX&lt;br /&gt;
: : : &lt;br /&gt;
: : : repeat&lt;br /&gt;
: : : ans 2&lt;br /&gt;
: : : until XXXXX&lt;br /&gt;
: : : &lt;br /&gt;
: : :  repeat&lt;br /&gt;
: : : ans 3&lt;br /&gt;
: : : until XXX&lt;br /&gt;
: : : &lt;br /&gt;
: : : until &lt;br /&gt;
: : : (TimeInMin = GameStartTime+3) or GameFinished;&lt;br /&gt;
: : : write('You are loss);&lt;br /&gt;
: : : &lt;br /&gt;
: : : it can't work~&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : There is only 1 repeat-until loop:&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: :   repeat
: :     GotoXY(1,2);
: :     write('Time left: ', 3-(TimeInMin-GameStart));
: :     ans 1 
: :     ans 2
: :     ans 3
: :   until 
: :     (TimeInMin = GameStartTime+3) or GameFinished;
: :   write('You are loss);
: : &lt;/pre&gt;&lt;br /&gt;
: : If you want to indicate a wrong answer, you need to add a boolean variable to the game. This variable can also be used to finish the loop.&lt;br /&gt;
: : &lt;br /&gt;
: I stil cant do this!!&lt;br /&gt;
: &amp;gt;&amp;lt;"&lt;br /&gt;
: I think you misunderstand my program~&lt;br /&gt;
: My program is check the letter of the answer one by one ,&lt;br /&gt;
: not check the complete answer one by one.&lt;br /&gt;
: By similiar&lt;br /&gt;
: if the answer is 'Food'&lt;br /&gt;
: The player first input the first letter of his answer&lt;br /&gt;
: then I check it .&lt;br /&gt;
: if his  lettter is incorrect , he will input it again until the letter is 'F' ,then he can input the second letter.&lt;br /&gt;
: Therefore ,many repeat loop must be used , then how can I add the timer in it??&lt;br /&gt;
: &lt;br /&gt;
: Sorry, my expreesion is not clear,&lt;br /&gt;
: hope that you can solve my program.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
The following code lets the user enter 1 letter at a time. This is repeated for the entire answer or the time runs out. I've left out some simple parts, or parts, which I already detailed previously.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  for i := 1 to Length(Answer) do
  begin
    repeat
      { User enters letter }
    until (UserEnteredLetter = Answer[i]) or (TimeInMin =&amp;gt; GameStartTime+3);
    if TimeInMin =&amp;gt; GameStartTime+3 then
      Break;
  end;
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/286182/re-crossword/#286182</guid>
      <pubDate>Wed, 22 Dec 2004 09:38:36 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/286445/re-crossword/#286445</link>
      <description>: : : &lt;br /&gt;
: : I stil cant do this!!&lt;br /&gt;
: : &amp;gt;&amp;lt;"&lt;br /&gt;
: : I think you misunderstand my program~&lt;br /&gt;
: : My program is check the letter of the answer one by one ,&lt;br /&gt;
: : not check the complete answer one by one.&lt;br /&gt;
: : By similiar&lt;br /&gt;
: : if the answer is 'Food'&lt;br /&gt;
: : The player first input the first letter of his answer&lt;br /&gt;
: : then I check it .&lt;br /&gt;
: : if his  lettter is incorrect , he will input it again until the letter is 'F' ,then he can input the second letter.&lt;br /&gt;
: : Therefore ,many repeat loop must be used , then how can I add the timer in it??&lt;br /&gt;
: : &lt;br /&gt;
: : Sorry, my expreesion is not clear,&lt;br /&gt;
: : hope that you can solve my program.&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: The following code lets the user enter 1 letter at a time. This is repeated for the entire answer or the time runs out. I've left out some simple parts, or parts, which I already detailed previously.&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
:   for i := 1 to Length(Answer) do
:   begin
:     repeat
:       { User enters letter }
:     until (UserEnteredLetter = Answer[i]) or (TimeInMin =&amp;gt; GameStartTime+3);
:     if TimeInMin =&amp;gt; GameStartTime+3 then
:       Break;
:   end;
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
thank you!!&lt;br /&gt;
Can you help me to find out what mistakes are??&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
begin
Answer:='Food';
for i:=1 to Length(Answer) do
begin
repeat
if Keypressed then
begin
GotoXY(8,34);
write(3-(TimeInMin-GameStartTime));
GotoXY(3,21);
ch :=readkey;
case ch of
#8 :Delete(PlayerGuess,Length(PlayerGuess),1);
#13 :InputFinished :=true;
#0 : ch:=readkey;
#1..#7,#9..#12,#14..#19:begin end;
else PlayerGuess:=PlayerGuess+ch;
end;
if i=1 then                  { Go to the certain position then enter 
GotoXY(3,21);                   letter}
write(ch);

if i=2 then
GotoXY(5,21);
write(ch);

if i=3 then
GotoXY(8,21);
write(ch);

if i=4 then
GotoXY(11,21);
write(ch);
end;
until (PlayerGuess[i]=Answer[i]) or (TimeInMin &amp;gt;= GameStartTime+3) ;

if InputFinshed then
begin

if PlayerGuess[1]=Answer[1]   &amp;lt;--{ change colour in display }
then
GotoXY(1,2)
TextColor(7);
write('F');

if PlayerGuess[2]=Answer[2]
then
GotoXY(1,5);
TextColor(7);
write('O');

if PlayerGuess[3]=Answer[3]
then
GotoXY(3,5);
TextColor(7);
write('O');

if PlayerGuess[4]=Answer[4]
then
GotoXY(3,6);
TextColor(7);
write('D');

if PlayerGuess[i]=Answer[i]
then
write('Win');

if PlayerGuess[i] &amp;lt;&amp;gt; Answer[i]  &amp;lt;---{ Get hint }
then 
Hint

if Hint=4  &amp;lt;---{ no chance}
then
write('Loss');

if TimeInMin = GameStartTime+3  {Times up}
then
write'Times up');

end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The problem is the position of the user entered.&lt;br /&gt;
I have creat certain boxes that the user can  fill in the box.&lt;br /&gt;
But how to set the coordinate in readkey ??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/286445/re-crossword/#286445</guid>
      <pubDate>Sat, 25 Dec 2004 09:22:42 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/286645/re-crossword/#286645</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2004-12-31 23:54:41&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : &lt;br /&gt;
: : : I stil cant do this!!&lt;br /&gt;
: : : &amp;gt;&amp;lt;"&lt;br /&gt;
: : : I think you misunderstand my program~&lt;br /&gt;
: : : My program is check the letter of the answer one by one ,&lt;br /&gt;
: : : not check the complete answer one by one.&lt;br /&gt;
: : : By similiar&lt;br /&gt;
: : : if the answer is 'Food'&lt;br /&gt;
: : : The player first input the first letter of his answer&lt;br /&gt;
: : : then I check it .&lt;br /&gt;
: : : if his  lettter is incorrect , he will input it again until the letter is 'F' ,then he can input the second letter.&lt;br /&gt;
: : : Therefore ,many repeat loop must be used , then how can I add the timer in it??&lt;br /&gt;
: : : &lt;br /&gt;
: : : Sorry, my expreesion is not clear,&lt;br /&gt;
: : : hope that you can solve my program.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : The following code lets the user enter 1 letter at a time. This is repeated for the entire answer or the time runs out. I've left out some simple parts, or parts, which I already detailed previously.&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: :   for i := 1 to Length(Answer) do
: :   begin
: :     repeat
: :       { User enters letter }
: :     until (UserEnteredLetter = Answer[i]) or (TimeInMin =&amp;gt; GameStartTime+3);
: :     if TimeInMin =&amp;gt; GameStartTime+3 then
: :       Break;
: :   end;
: : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: thank you!!&lt;br /&gt;
: Can you help me to find out what mistakes are??&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: begin
: Answer:='Food';
: for i:=1 to Length(Answer) do
: begin
: repeat
: if Keypressed then
: begin
: GotoXY(8,34);
: write(3-(TimeInMin-GameStartTime));
: GotoXY(3,21);
: ch :=readkey;
: case ch of
: #8 :Delete(PlayerGuess,Length(PlayerGuess),1);
: #13 :InputFinished :=true;
: #0 : ch:=readkey;
: #1..#7,#9..#12,#14..#19:begin end;
: else PlayerGuess:=PlayerGuess+ch;
: end;
: if i=1 then                  { Go to the certain position then enter 
: GotoXY(3,21);                   letter}
: write(ch);
: 
: if i=2 then
: GotoXY(5,21);
: write(ch);
: 
: if i=3 then
: GotoXY(8,21);
: write(ch);
: 
: if i=4 then
: GotoXY(11,21);
: write(ch);
: end;
: until (PlayerGuess[i]=Answer[i]) or (TimeInMin &amp;gt;= GameStartTime+3) ;
: 
: if InputFinshed then
: begin
: 
: if PlayerGuess[1]=Answer[1]   &amp;lt;--{ change colour in display }
: then
: GotoXY(1,2)
: TextColor(7);
: write('F');
: 
: if PlayerGuess[2]=Answer[2]
: then
: GotoXY(1,5);
: TextColor(7);
: write('O');
: 
: if PlayerGuess[3]=Answer[3]
: then
: GotoXY(3,5);
: TextColor(7);
: write('O');
: 
: if PlayerGuess[4]=Answer[4]
: then
: GotoXY(3,6);
: TextColor(7);
: write('D');
: 
: if PlayerGuess[i]=Answer[i]
: then
: write('Win');
: 
: if PlayerGuess[i] &amp;lt;&amp;gt; Answer[i]  &amp;lt;---{ Get hint }
: then 
: Hint
: 
: if Hint=4  &amp;lt;---{ no chance}
: then
: write('Loss');
: 
: if TimeInMin = GameStartTime+3  {Times up}
: then
: write'Times up');
: 
: end.
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: The problem is the position of the user entered.&lt;br /&gt;
: I have creat certain boxes that the user can  fill in the box.&lt;br /&gt;
: But how to set the coordinate in readkey ??&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: :&lt;br /&gt;
: &lt;br /&gt;
Zibadian???&lt;br /&gt;
Are you here??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/286645/re-crossword/#286645</guid>
      <pubDate>Mon, 27 Dec 2004 23:36:50 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287051/re-crossword/#287051</link>
      <description>: : : : &lt;br /&gt;
: : : I stil cant do this!!&lt;br /&gt;
: : : &amp;gt;&amp;lt;"&lt;br /&gt;
: : : I think you misunderstand my program~&lt;br /&gt;
: : : My program is check the letter of the answer one by one ,&lt;br /&gt;
: : : not check the complete answer one by one.&lt;br /&gt;
: : : By similiar&lt;br /&gt;
: : : if the answer is 'Food'&lt;br /&gt;
: : : The player first input the first letter of his answer&lt;br /&gt;
: : : then I check it .&lt;br /&gt;
: : : if his  lettter is incorrect , he will input it again until the letter is 'F' ,then he can input the second letter.&lt;br /&gt;
: : : Therefore ,many repeat loop must be used , then how can I add the timer in it??&lt;br /&gt;
: : : &lt;br /&gt;
: : : Sorry, my expreesion is not clear,&lt;br /&gt;
: : : hope that you can solve my program.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : The following code lets the user enter 1 letter at a time. This is repeated for the entire answer or the time runs out. I've left out some simple parts, or parts, which I already detailed previously.&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: :   for i := 1 to Length(Answer) do
: :   begin
: :     repeat
: :       { User enters letter }
: :     until (UserEnteredLetter = Answer[i]) or (TimeInMin =&amp;gt; GameStartTime+3);
: :     if TimeInMin =&amp;gt; GameStartTime+3 then
: :       Break;
: :   end;
: : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: thank you!!&lt;br /&gt;
: Can you help me to find out what mistakes are??&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: begin
: Answer:='Food';
: for i:=1 to Length(Answer) do
: begin
: repeat
: if Keypressed then
: begin
: GotoXY(8,34);
: write(3-(TimeInMin-GameStartTime));
: GotoXY(3,21);
: ch :=readkey;
: case ch of
: #8 :Delete(PlayerGuess,Length(PlayerGuess),1);
: #13 :InputFinished :=true;
: #0 : ch:=readkey;
: #1..#7,#9..#12,#14..#19:begin end;
: else PlayerGuess:=PlayerGuess+ch;
: end;
: if i=1 then                  { Go to the certain position then enter 
: GotoXY(3,21);                   letter}
: write(ch);
: 
: if i=2 then
: GotoXY(5,21);
: write(ch);
: 
: if i=3 then
: GotoXY(8,21);
: write(ch);
: 
: if i=4 then
: GotoXY(11,21);
: write(ch);
: end;
: until (PlayerGuess[i]=Answer[i]) or (TimeInMin &amp;gt;= GameStartTime+3) ;
: 
: if InputFinshed then
: begin
: 
: if PlayerGuess[1]=Answer[1]   &amp;lt;--{ change colour in display }
: then
: GotoXY(1,2)
: TextColor(7);
: write('F');
: 
: if PlayerGuess[2]=Answer[2]
: then
: GotoXY(1,5);
: TextColor(7);
: write('O');
: 
: if PlayerGuess[3]=Answer[3]
: then
: GotoXY(3,5);
: TextColor(7);
: write('O');
: 
: if PlayerGuess[4]=Answer[4]
: then
: GotoXY(3,6);
: TextColor(7);
: write('D');
: 
: if PlayerGuess[i]=Answer[i]
: then
: write('Win');
: 
: if PlayerGuess[i] &amp;lt;&amp;gt; Answer[i]  &amp;lt;---{ Get hint }
: then 
: Hint
: 
: if Hint=4  &amp;lt;---{ no chance}
: then
: write('Loss');
: 
: if TimeInMin = GameStartTime+3  {Times up}
: then
: write'Times up');
: 
: end.
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: The problem is the position of the user entered.&lt;br /&gt;
: I have creat certain boxes that the user can  fill in the box.&lt;br /&gt;
: But how to set the coordinate in readkey ??&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: :&lt;br /&gt;
: &lt;br /&gt;
It is very annoying~&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287051/re-crossword/#287051</guid>
      <pubDate>Fri, 31 Dec 2004 23:57:13 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287056/re-crossword/#287056</link>
      <description>: : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : \Please help me!&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : :    How can do this??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : THZ~&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : THX~&lt;br /&gt;
: : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : &lt;br /&gt;
: OK!The problem has been solved.&lt;br /&gt;
: &lt;br /&gt;
: 2)I think this method is not suitable in my idea.&lt;br /&gt;
:   My idea is like that:&lt;br /&gt;
:   I had set a display with many letters for the player to choose them.&lt;br /&gt;
:   If they choose a right letter, it will change colour.&lt;br /&gt;
: &lt;br /&gt;
: Any other method??&lt;br /&gt;
: &lt;br /&gt;
: 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
Here is a little function I write for you to handle the key presses:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
function ReadText(var UserInput: string; const X, Y: integer): boolean;
{ This is a non-blocking user entry function
  Handles the following key-strokes:
  - Backspace: removes last character
  - Enter: Sets the result to true
  - ASCII Code 32 (space) and upwards are valid characters
  - Removes extended (multi-byte) keypresses
  Other features:
  - Reduces flickering by first checking if the user actually pressed a key
  - positions the input field at X, Y relative to top-left of the screen
}
begin
  ReadText := false; { Assume a non-enter key }
  if KeyPressed then { Check for key-press }
  begin
    ch := ReadKey; { Get the ASCII key code }
    case ch of
      #0..#7: ;
      #8: Delete(UserInput, Length(UserInput), 1);
      #9..#12: ;
      #13: ReadText := true;
      #14..#31: ;
      else UserInput := UserInput + ch;
    end;
    while KeyPressed do ReadKey; { Remove extended }
    GotoXY(X, Y); { Show the result at X, Y }
    write(UserInput);
  end;
end;
&lt;/pre&gt;&lt;br /&gt;
It is untested, but should work.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287056/re-crossword/#287056</guid>
      <pubDate>Sat, 01 Jan 2005 04:17:34 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287283/re-crossword/#287283</link>
      <description>: : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : \Please help me!&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : :    How can do this??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : THZ~&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : THX~&lt;br /&gt;
: : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : &lt;br /&gt;
: : OK!The problem has been solved.&lt;br /&gt;
: : &lt;br /&gt;
: : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: :   My idea is like that:&lt;br /&gt;
: :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : &lt;br /&gt;
: : Any other method??&lt;br /&gt;
: : &lt;br /&gt;
: : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: Here is a little function I write for you to handle the key presses:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: function ReadText(var UserInput: string; const X, Y: integer): boolean;
: { This is a non-blocking user entry function
:   Handles the following key-strokes:
:   - Backspace: removes last character
:   - Enter: Sets the result to true
:   - ASCII Code 32 (space) and upwards are valid characters
:   - Removes extended (multi-byte) keypresses
:   Other features:
:   - Reduces flickering by first checking if the user actually pressed a key
:   - positions the input field at X, Y relative to top-left of the screen
: }
: begin
:   ReadText := false; { Assume a non-enter key }
:   if KeyPressed then { Check for key-press }
:   begin
:     ch := ReadKey; { Get the ASCII key code }
:     case ch of
:       #0..#7: ;
:       #8: Delete(UserInput, Length(UserInput), 1);
:       #9..#12: ;
:       #13: ReadText := true;
:       #14..#31: ;
:       else UserInput := UserInput + ch;
:     end;
:     while KeyPressed do ReadKey; { Remove extended }
:     GotoXY(X, Y); { Show the result at X, Y }
:     write(UserInput);
:   end;
: end;
: &lt;/pre&gt;&lt;br /&gt;
: It is untested, but should work.&lt;br /&gt;
: &lt;br /&gt;
I have followed your function but why it can't work ??&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
function ReadText(var UserInput: string; const X, Y: integer): boolean;
begin
  ReadText := false; { Assume a non-enter key }
  if KeyPressed then { Check for key-press }
  begin
    GotoXY(X,Y);
    ch := ReadKey; { Get the ASCII key code }
    case ch of
      #0..#7: ;
      #8: Delete(UserInput, Length(UserInput), 1);
      #9 :write('Answer is CLOCK TOWER. (Press ESC to exit)');
      #10..#12: ;
      #13: ReadText := true;
      #14..#26: ;
      #27 :exit; [press ESC then exit]
      #28..#31: ;
      else UserInput := UserInput + ch;
    end;
    while KeyPressed do ReadKey; { Remove extended }
    GotoXY(X, Y); { Show the result at X, Y }
    write(UserInput);
  end;
end;

begin
ClrScr;
Display;
GameStartTime := TimeInMin;
Answer:='LOCKTOWE';
UserInput:= '';


for i:=1 to Length(Answer) do
begin
repeat
GotoXY(8,34);
write(3-(TimeInMin-GameStartTime));

if i=1 then
ReadText(UserInput,12,21);

if i=2 then
ReadText(UserInput,18,21);

if i=3 then
ReadText(UserInput,24,21);

if i=4 then
ReadText(UserInput,30,21);

if i=5 then
ReadText(UserInput,6,25);

if i=6 then
ReadText(UserInput,12,25);

if i=7 then
ReadText(UserInput,18,25);

if i=8 then
ReadText(UserInput,24,25);


until (UserInput[i]=Answer[i]) or (TimeInMin &amp;gt; GameStartTime+3);

if TimeInMin=GameStartTime+3 then
GotoXY(37,23);
write('Time Up ! You are loss!');
exitt(K);
if K='k' then exit;

end;

if ReadText(UserInput,X,Y)  then
begin
 if UserInput[i] &amp;lt;&amp;gt; Answer[i] then
Get_hint(hint);
if hint=4 then exitt(K);
if K='k' then exit;

if UserInput[1]=Answer[1] then
textcolor(14);
GotoXY(11,13);
write('L') ;              {if the letter is right, then the same  letter in the Display change color}


if UserInput[2]=Answer[2] then
textcolor(14);
GotoXY(11,15);
write('O');


if UserInput[3]=Answer[3] then
textcolor(14);
GotoXY(17,15);
write('C');


if UserInput[4]=Answer[4] then
textcolor(14);
GotoXY(17,17);
write('K');


if UserInput[5]=Answer[5] then
textcolor(14);
GotoXY(17,9);
write('T');


if UserInput[6]=Answer[6] then
textcolor(14);
GotoXY(23,9);
write('O');


if UserInput[7]=Answer[7] then
textcolor(14);
GotoXY(23,11);
write('W');


if UserInput[8]=Answer[8] then
textcolor(14);
GotoXY(29,11);
write('E');


if UserInput=Answer then
GotoXY(37,22);
writeln('You are Win!!');
exitt(K);
if K='k' then exit;

end;



end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287283/re-crossword/#287283</guid>
      <pubDate>Tue, 04 Jan 2005 06:35:23 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287426/re-crossword/#287426</link>
      <description>: : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : \Please help me!&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : :    How can do this??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : THZ~&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : THX~&lt;br /&gt;
: : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : &lt;br /&gt;
: : OK!The problem has been solved.&lt;br /&gt;
: : &lt;br /&gt;
: : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: :   My idea is like that:&lt;br /&gt;
: :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : &lt;br /&gt;
: : Any other method??&lt;br /&gt;
: : &lt;br /&gt;
: : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: Here is a little function I write for you to handle the key presses:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: function ReadText(var UserInput: string; const X, Y: integer): boolean;
: { This is a non-blocking user entry function
:   Handles the following key-strokes:
:   - Backspace: removes last character
:   - Enter: Sets the result to true
:   - ASCII Code 32 (space) and upwards are valid characters
:   - Removes extended (multi-byte) keypresses
:   Other features:
:   - Reduces flickering by first checking if the user actually pressed a key
:   - positions the input field at X, Y relative to top-left of the screen
: }
: begin
:   ReadText := false; { Assume a non-enter key }
:   if KeyPressed then { Check for key-press }
:   begin
:     ch := ReadKey; { Get the ASCII key code }
:     case ch of
:       #0..#7: ;
:       #8: Delete(UserInput, Length(UserInput), 1);
:       #9..#12: ;
:       #13: ReadText := true;
:       #14..#31: ;
:       else UserInput := UserInput + ch;
:     end;
:     while KeyPressed do ReadKey; { Remove extended }
:     GotoXY(X, Y); { Show the result at X, Y }
:     write(UserInput);
:   end;
: end;
: &lt;/pre&gt;&lt;br /&gt;
: It is untested, but should work.&lt;br /&gt;
: &lt;br /&gt;
Yes.I have found something not understand.&lt;br /&gt;
This function is a boolean ,how can it write UserInput??&lt;br /&gt;
It juct consider whether the function is true or false~&lt;br /&gt;
What different between using function and procedure??&lt;br /&gt;
&lt;br /&gt;
How can I contact you expect in this forum ??&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287426/re-crossword/#287426</guid>
      <pubDate>Wed, 05 Jan 2005 09:12:19 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287430/re-crossword/#287430</link>
      <description>: : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : THZ~&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : THX~&lt;br /&gt;
: : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : OK!The problem has been solved.&lt;br /&gt;
: : : &lt;br /&gt;
: : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : :   My idea is like that:&lt;br /&gt;
: : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : &lt;br /&gt;
: : : Any other method??&lt;br /&gt;
: : : &lt;br /&gt;
: : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : Here is a little function I write for you to handle the key presses:&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: : function ReadText(var UserInput: string; const X, Y: integer): boolean;
: : { This is a non-blocking user entry function
: :   Handles the following key-strokes:
: :   - Backspace: removes last character
: :   - Enter: Sets the result to true
: :   - ASCII Code 32 (space) and upwards are valid characters
: :   - Removes extended (multi-byte) keypresses
: :   Other features:
: :   - Reduces flickering by first checking if the user actually pressed a key
: :   - positions the input field at X, Y relative to top-left of the screen
: : }
: : begin
: :   ReadText := false; { Assume a non-enter key }
: :   if KeyPressed then { Check for key-press }
: :   begin
: :     ch := ReadKey; { Get the ASCII key code }
: :     case ch of
: :       #0..#7: ;
: :       #8: Delete(UserInput, Length(UserInput), 1);
: :       #9..#12: ;
: :       #13: ReadText := true;
: :       #14..#31: ;
: :       else UserInput := UserInput + ch;
: :     end;
: :     while KeyPressed do ReadKey; { Remove extended }
: :     GotoXY(X, Y); { Show the result at X, Y }
: :     write(UserInput);
: :   end;
: : end;
: : &lt;/pre&gt;&lt;br /&gt;
: : It is untested, but should work.&lt;br /&gt;
: : &lt;br /&gt;
: Yes.I have found something not understand.&lt;br /&gt;
: This function is a boolean ,how can it write UserInput??&lt;br /&gt;
: It juct consider whether the function is true or false~&lt;br /&gt;
: What different between using function and procedure??&lt;br /&gt;
: &lt;br /&gt;
: How can I contact you expect in this forum ??&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
The function also exports the UserInput parameter (it's a var parameter). The function returns true if the user presses ENTER. You can use this function like a readln if you place it in a repeat-until loop. Inside that loop, you can then perform other code, such as checking for time. Here is an example:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  repeat
  until (ReadText(UserInput, 10, 10)) or (Now = EndTime);
&lt;/pre&gt;&lt;br /&gt;
The difference between a function and a procedure is that a function returns a result, while a procedure doesn't. This allows functions to become a part of a larger statement, while procedures are single statements. KeyPressed() is also examples of a function. If KeyPressed was a procedure, I would have had to code the part of the ReadText() function as follows:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
begin
  ReadText := false; { Assume a non-enter key }
  KeyPressed(SomeBool);
  if SomeBool then { Check for key-press }
  begin
&lt;/pre&gt;&lt;br /&gt;
and add another temporary variable.&lt;br /&gt;
The ways to contact me are on My Page here at this site.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287430/re-crossword/#287430</guid>
      <pubDate>Wed, 05 Jan 2005 10:00:10 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287494/re-crossword/#287494</link>
      <description>: : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : THX~&lt;br /&gt;
: : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : OK!The problem has been solved.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : :   My idea is like that:&lt;br /&gt;
: : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : Any other method??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : Here is a little function I write for you to handle the key presses:&lt;br /&gt;
: : : &lt;pre class="sourcecode"&gt;
: : : function ReadText(var UserInput: string; const X, Y: integer): boolean;
: : : { This is a non-blocking user entry function
: : :   Handles the following key-strokes:
: : :   - Backspace: removes last character
: : :   - Enter: Sets the result to true
: : :   - ASCII Code 32 (space) and upwards are valid characters
: : :   - Removes extended (multi-byte) keypresses
: : :   Other features:
: : :   - Reduces flickering by first checking if the user actually pressed a key
: : :   - positions the input field at X, Y relative to top-left of the screen
: : : }
: : : begin
: : :   ReadText := false; { Assume a non-enter key }
: : :   if KeyPressed then { Check for key-press }
: : :   begin
: : :     ch := ReadKey; { Get the ASCII key code }
: : :     case ch of
: : :       #0..#7: ;
: : :       #8: Delete(UserInput, Length(UserInput), 1);
: : :       #9..#12: ;
: : :       #13: ReadText := true;
: : :       #14..#31: ;
: : :       else UserInput := UserInput + ch;
: : :     end;
: : :     while KeyPressed do ReadKey; { Remove extended }
: : :     GotoXY(X, Y); { Show the result at X, Y }
: : :     write(UserInput);
: : :   end;
: : : end;
: : : &lt;/pre&gt;&lt;br /&gt;
: : : It is untested, but should work.&lt;br /&gt;
: : : &lt;br /&gt;
&lt;br /&gt;
: The function also exports the UserInput parameter (it's a var parameter). The function returns true if the user presses ENTER. You can use this function like a readln if you place it in a repeat-until loop. Inside that loop, you can then perform other code, such as checking for time. Here is an example:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
:   repeat
:   until (ReadText(UserInput, 10, 10)) or (Now = EndTime);
: &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
But when I do it like this??&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
repeat
ReadText(UserInput,10,10);
until (ReadText(UserInput, 10, 10))

if (ReadText(UserInput, 10, 10)) then
begin
if UserInput&amp;lt;&amp;gt; Answer then &amp;lt;--##
writeln('Loss');
else
writeln('Win');
end;
end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
the program  just do the repeat loop.&lt;br /&gt;
I think  that it is because the UserInput can not be export&lt;br /&gt;
,so it can't check the answer.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287494/re-crossword/#287494</guid>
      <pubDate>Thu, 06 Jan 2005 02:54:44 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287498/re-crossword/#287498</link>
      <description>: : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : THX~&lt;br /&gt;
: : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : :   My idea is like that:&lt;br /&gt;
: : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Any other method??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : Here is a little function I write for you to handle the key presses:&lt;br /&gt;
: : : : &lt;pre class="sourcecode"&gt;
: : : : function ReadText(var UserInput: string; const X, Y: integer): boolean;
: : : : { This is a non-blocking user entry function
: : : :   Handles the following key-strokes:
: : : :   - Backspace: removes last character
: : : :   - Enter: Sets the result to true
: : : :   - ASCII Code 32 (space) and upwards are valid characters
: : : :   - Removes extended (multi-byte) keypresses
: : : :   Other features:
: : : :   - Reduces flickering by first checking if the user actually pressed a key
: : : :   - positions the input field at X, Y relative to top-left of the screen
: : : : }
: : : : begin
: : : :   ReadText := false; { Assume a non-enter key }
: : : :   if KeyPressed then { Check for key-press }
: : : :   begin
: : : :     ch := ReadKey; { Get the ASCII key code }
: : : :     case ch of
: : : :       #0..#7: ;
: : : :       #8: Delete(UserInput, Length(UserInput), 1);
: : : :       #9..#12: ;
: : : :       #13: ReadText := true;
: : : :       #14..#31: ;
: : : :       else UserInput := UserInput + ch;
: : : :     end;
: : : :     while KeyPressed do ReadKey; { Remove extended }
: : : :     GotoXY(X, Y); { Show the result at X, Y }
: : : :     write(UserInput);
: : : :   end;
: : : : end;
: : : : &lt;/pre&gt;&lt;br /&gt;
: : : : It is untested, but should work.&lt;br /&gt;
: : : : &lt;br /&gt;
: &lt;br /&gt;
: : The function also exports the UserInput parameter (it's a var parameter). The function returns true if the user presses ENTER. You can use this function like a readln if you place it in a repeat-until loop. Inside that loop, you can then perform other code, such as checking for time. Here is an example:&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: :   repeat
: :   until (ReadText(UserInput, 10, 10)) or (Now = EndTime);
: : &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: But when I do it like this??&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: repeat
: ReadText(UserInput,10,10);
: until (ReadText(UserInput, 10, 10))
: 
: if (ReadText(UserInput, 10, 10)) then
: begin
: if UserInput&amp;lt;&amp;gt; Answer then &amp;lt;--##
: writeln('Loss');
: else
: writeln('Win');
: end;
: end.
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: the program  just do the repeat loop.&lt;br /&gt;
: I think  that it is because the UserInput can not be export&lt;br /&gt;
: ,so it can't check the answer.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
UserInput is being exported, that's what the var before UserInput is for.&lt;br /&gt;
The repeat until loop you created will not work, because it has a ReadText() inside it. This way the user might press enter for the inner ReadText() and still remain inside the loop. You can however show the time remaining in the loop, like this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  repeat
    GotoXY(1,1);
    Writeln(i);
    inc(i);
  until ReadText(UsderInput, 10, 10);
  if UserInput = Answer then
    Writeln('You win')
  else
    Writeln('You lose');
&lt;/pre&gt;&lt;br /&gt;
You don't need to call ReadText() in the if-then, because the user doesn't have to enter his answer again. In fact your code will check the answer only if the user presses the enter again within a few milliseconds after the first time.&lt;br /&gt;
Run this last code and you'll see what I mean.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287498/re-crossword/#287498</guid>
      <pubDate>Thu, 06 Jan 2005 03:15:42 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287526/re-crossword/#287526</link>
      <description>: : : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : THX~&lt;br /&gt;
: : : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : : :   My idea is like that:&lt;br /&gt;
: : : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Any other method??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : Here is a little function I write for you to handle the key presses:&lt;br /&gt;
: : : : : &lt;pre class="sourcecode"&gt;
: : : : : function ReadText(var UserInput: string; const X, Y: integer): boolean;
: : : : : { This is a non-blocking user entry function
: : : : :   Handles the following key-strokes:
: : : : :   - Backspace: removes last character
: : : : :   - Enter: Sets the result to true
: : : : :   - ASCII Code 32 (space) and upwards are valid characters
: : : : :   - Removes extended (multi-byte) keypresses
: : : : :   Other features:
: : : : :   - Reduces flickering by first checking if the user actually pressed a key
: : : : :   - positions the input field at X, Y relative to top-left of the screen
: : : : : }
: : : : : begin
: : : : :   ReadText := false; { Assume a non-enter key }
: : : : :   if KeyPressed then { Check for key-press }
: : : : :   begin
: : : : :     ch := ReadKey; { Get the ASCII key code }
: : : : :     case ch of
: : : : :       #0..#7: ;
: : : : :       #8: Delete(UserInput, Length(UserInput), 1);
: : : : :       #9..#12: ;
: : : : :       #13: ReadText := true;
: : : : :       #14..#31: ;
: : : : :       else UserInput := UserInput + ch;
: : : : :     end;
: : : : :     while KeyPressed do ReadKey; { Remove extended }
: : : : :     GotoXY(X, Y); { Show the result at X, Y }
: : : : :     write(UserInput);
: : : : :   end;
: : : : : end;
: : : : : &lt;/pre&gt;&lt;br /&gt;
: : : : : It is untested, but should work.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : &lt;br /&gt;
: : : The function also exports the UserInput parameter (it's a var parameter). The function returns true if the user presses ENTER. You can use this function like a readln if you place it in a repeat-until loop. Inside that loop, you can then perform other code, such as checking for time. Here is an example:&lt;br /&gt;
: : : &lt;pre class="sourcecode"&gt;
: : :   repeat
: : :   until (ReadText(UserInput, 10, 10)) or (Now = EndTime);
: : : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: : But when I do it like this??&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: : repeat
: : ReadText(UserInput,10,10);
: : until (ReadText(UserInput, 10, 10))
: : 
: : if (ReadText(UserInput, 10, 10)) then
: : begin
: : if UserInput&amp;lt;&amp;gt; Answer then &amp;lt;--##
: : writeln('Loss');
: : else
: : writeln('Win');
: : end;
: : end.
: : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: : the program  just do the repeat loop.&lt;br /&gt;
: : I think  that it is because the UserInput can not be export&lt;br /&gt;
: : ,so it can't check the answer.&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: UserInput is being exported, that's what the var before UserInput is for.&lt;br /&gt;
: The repeat until loop you created will not work, because it has a ReadText() inside it. This way the user might press enter for the inner ReadText() and still remain inside the loop. You can however show the time remaining in the loop, like this:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
:   repeat
:     GotoXY(1,1);
:     Writeln(i);
:     inc(i);
:   until ReadText(UsderInput, 10, 10);
:   if UserInput = Answer then
:     Writeln('You win')
:   else
:     Writeln('You lose');
: &lt;/pre&gt;&lt;br /&gt;
: You don't need to call ReadText() in the if-then, because the user doesn't have to enter his answer again. In fact your code will check the answer only if the user presses the enter again within a few milliseconds after the first time.&lt;br /&gt;
: Run this last code and you'll see what I mean.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Oh ~I see.&lt;br /&gt;
Is it like this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
repeat
:     GotoXY(1,1);
:     Writeln(3-(TimeInMin-GameStartTime));
:     inc(3-(TimeInMin-GameStartTime));  &amp;lt;---what is inc??
:   until ReadText(UsderInput, 10, 10) &amp;lt;---But how to move to next question?? 
:   if UserInput[i] &amp;lt;&amp;gt; Answer[i] then
    begin
    Get_hint
    if hint&amp;gt;4 then
     Writeln('You lose')
:   else
:     Writeln('You lose');
end;
end.

&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287526/re-crossword/#287526</guid>
      <pubDate>Thu, 06 Jan 2005 06:03:33 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287529/re-crossword/#287529</link>
      <description>: : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : \Please help me!&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : :    How can do this??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : THZ~&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : THX~&lt;br /&gt;
: : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : &lt;br /&gt;
: OK!The problem has been solved.&lt;br /&gt;
: &lt;br /&gt;
: 2)I think this method is not suitable in my idea.&lt;br /&gt;
:   My idea is like that:&lt;br /&gt;
:   I had set a display with many letters for the player to choose them.&lt;br /&gt;
:   If they choose a right letter, it will change colour.&lt;br /&gt;
: &lt;br /&gt;
: Any other method??&lt;br /&gt;
: &lt;br /&gt;
: 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
Inc is short for increase, which should be explained in the help files.&lt;br /&gt;
ReadText() is designed to get the whole answer in 1 loop, then you can check it and ask the user the next question.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287529/re-crossword/#287529</guid>
      <pubDate>Thu, 06 Jan 2005 06:10:27 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287538/re-crossword/#287538</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:47&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:7&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : \Please help me!&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : :    How can do this??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : THZ~&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : THX~&lt;br /&gt;
: : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : &lt;br /&gt;
: : OK!The problem has been solved.&lt;br /&gt;
: : &lt;br /&gt;
: : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: :   My idea is like that:&lt;br /&gt;
: :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : &lt;br /&gt;
: : Any other method??&lt;br /&gt;
: : &lt;br /&gt;
: : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: Inc is short for increase, which should be explained in the help files.&lt;br /&gt;
: ReadText() is designed to get the whole answer in 1 loop, then you can check it and ask the user the next question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But how the program know when should it increase??&lt;br /&gt;
What is the use of this inc() comment in the crossword??&lt;br /&gt;
&lt;br /&gt;
NO~ I want to get each of the letter in loop,then i can check it one by one and move to next letter if the user entered is right.&lt;br /&gt;
&lt;br /&gt;
layout&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
###########################################
#     #      #      #      #       #      #
#     #      #      #      #       #      #
###########################################
&lt;/pre&gt;&lt;br /&gt;
There are 6 boxes, the user need to enter the first letter in the first box and press enter and then check it .If the letter is right ,then (GotoXY) move to next box and enter the second letter......Therefore the coordinateXY of each boxes are different .&lt;br /&gt;
&lt;br /&gt;
So how can the function work in this way??&lt;br /&gt;
&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287538/re-crossword/#287538</guid>
      <pubDate>Thu, 06 Jan 2005 07:44:39 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287609/re-crossword/#287609</link>
      <description>: i have some questions about crossword ~&lt;br /&gt;
: \Please help me!&lt;br /&gt;
: &lt;br /&gt;
: 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: &lt;br /&gt;
: 2) I want to know does pascal has this function??&lt;br /&gt;
:    if i input the right answer in the game &lt;br /&gt;
:    then the colour of text will change to another colour~~&lt;br /&gt;
:    How can do this??&lt;br /&gt;
: &lt;br /&gt;
: Suggest the simplest way to me~&lt;br /&gt;
: THZ~&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
To set the background colour in Pascal use this: textbackground(colour); {colour is where you have to put your colour which you want } and for text colour use this: textcolor(colour); &lt;br /&gt;
&lt;br /&gt;
Yes no.2 can be done in Pascal but I don't know how. &lt;br /&gt;
&lt;br /&gt;
Xaser-3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287609/re-crossword/#287609</guid>
      <pubDate>Thu, 06 Jan 2005 17:39:43 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287670/re-crossword/#287670</link>
      <description>: : i have some questions about crossword ~&lt;br /&gt;
: : \Please help me!&lt;br /&gt;
: : &lt;br /&gt;
: : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : &lt;br /&gt;
: : 2) I want to know does pascal has this function??&lt;br /&gt;
: :    if i input the right answer in the game &lt;br /&gt;
: :    then the colour of text will change to another colour~~&lt;br /&gt;
: :    How can do this??&lt;br /&gt;
: : &lt;br /&gt;
: : Suggest the simplest way to me~&lt;br /&gt;
: : THZ~&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: To set the background colour in Pascal use this: textbackground(colour); {colour is where you have to put your colour which you want } and for text colour use this: textcolor(colour); &lt;br /&gt;
: &lt;br /&gt;
: Yes no.2 can be done in Pascal but I don't know how. &lt;br /&gt;
: &lt;br /&gt;
: Xaser-3&lt;br /&gt;
: &lt;br /&gt;
Have you read this post http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=16&amp;amp;MsgID=2815
21&amp;amp;Setting=A0001F2002 ? It is basically the same answer you gave here.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287670/re-crossword/#287670</guid>
      <pubDate>Fri, 07 Jan 2005 05:09:02 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287708/re-crossword/#287708</link>
      <description>: : i have some questions about crossword ~&lt;br /&gt;
: : \Please help me!&lt;br /&gt;
: : &lt;br /&gt;
: : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : &lt;br /&gt;
: : 2) I want to know does pascal has this function??&lt;br /&gt;
: :    if i input the right answer in the game &lt;br /&gt;
: :    then the colour of text will change to another colour~~&lt;br /&gt;
: :    How can do this??&lt;br /&gt;
: : &lt;br /&gt;
: : Suggest the simplest way to me~&lt;br /&gt;
: : THZ~&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: To set the background colour in Pascal use this: textbackground(colour); {colour is where you have to put your colour which you want } and for text colour use this: textcolor(colour); &lt;br /&gt;
: &lt;br /&gt;
: Yes no.2 can be done in Pascal but I don't know how. &lt;br /&gt;
: &lt;br /&gt;
: Xaser-3&lt;br /&gt;
: &lt;br /&gt;
: I just use write() and GotoXY() to do .~&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287708/re-crossword/#287708</guid>
      <pubDate>Fri, 07 Jan 2005 07:55:00 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287710/re-crossword/#287710</link>
      <description>: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:47&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:7&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : THZ~&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : THX~&lt;br /&gt;
: : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : OK!The problem has been solved.&lt;br /&gt;
: : : &lt;br /&gt;
: : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : :   My idea is like that:&lt;br /&gt;
: : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : &lt;br /&gt;
: : : Any other method??&lt;br /&gt;
: : : &lt;br /&gt;
: : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : Inc is short for increase, which should be explained in the help files.&lt;br /&gt;
: : ReadText() is designed to get the whole answer in 1 loop, then you can check it and ask the user the next question.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: But how the program know when should it increase??&lt;br /&gt;
: What is the use of this inc() comment in the crossword??&lt;br /&gt;
: &lt;br /&gt;
: NO~ I want to get each of the letter in loop,then i can check it one by one and move to next letter if the user entered is right.&lt;br /&gt;
: &lt;br /&gt;
: layout&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: ###########################################
: #     #      #      #      #       #      #
: #     #      #      #      #       #      #
: ###########################################
: &lt;/pre&gt;&lt;br /&gt;
: There are 6 boxes, the user need to enter the first letter in the first box and press enter and then check it .If the letter is right ,then (GotoXY) move to next box and enter the second letter......Therefore the coordinateXY of each boxes are different .&lt;br /&gt;
: &lt;br /&gt;
: So how can the function work in this way??&lt;br /&gt;
: &lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287710/re-crossword/#287710</guid>
      <pubDate>Fri, 07 Jan 2005 07:56:40 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287751/re-crossword/#287751</link>
      <description>: : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:47&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:7&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : THX~&lt;br /&gt;
: : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : OK!The problem has been solved.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : :   My idea is like that:&lt;br /&gt;
: : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : Any other method??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : Inc is short for increase, which should be explained in the help files.&lt;br /&gt;
: : : ReadText() is designed to get the whole answer in 1 loop, then you can check it and ask the user the next question.&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : But how the program know when should it increase??&lt;br /&gt;
: : What is the use of this inc() comment in the crossword??&lt;br /&gt;
: : &lt;br /&gt;
: : NO~ I want to get each of the letter in loop,then i can check it one by one and move to next letter if the user entered is right.&lt;br /&gt;
: : &lt;br /&gt;
: : layout&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: : ###########################################
: : #     #      #      #      #       #      #
: : #     #      #      #      #       #      #
: : ###########################################
: : &lt;/pre&gt;&lt;br /&gt;
: : There are 6 boxes, the user need to enter the first letter in the first box and press enter and then check it .If the letter is right ,then (GotoXY) move to next box and enter the second letter......Therefore the coordinateXY of each boxes are different .&lt;br /&gt;
: : &lt;br /&gt;
: : So how can the function work in this way??&lt;br /&gt;
: : &lt;br /&gt;
: : : &lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: ??&lt;br /&gt;
: &lt;br /&gt;
I would use the normal KeyPressed/Readkey combination for that:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  repeat
    ch := '';
    repeat
      { Show time to user }
      &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
        Break;
      if KeyPressed then
        ch := ReadKey;
    until ch &amp;lt;&amp;gt; '';
    &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
      Break;
  until ch = AnswerLetter;
&lt;/pre&gt;&lt;br /&gt;
You might want to place this loop into a function with the AnswerLetter as parameter and the user input as result.&lt;br /&gt;
The red if-thens's need some work. These are to ensure that the user runs out of time during the input.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287751/re-crossword/#287751</guid>
      <pubDate>Fri, 07 Jan 2005 13:31:00 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/287788/re-crossword/#287788</link>
      <description>: : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:47&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:7&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : THX~&lt;br /&gt;
: : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : :   My idea is like that:&lt;br /&gt;
: : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Any other method??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : Inc is short for increase, which should be explained in the help files.&lt;br /&gt;
: : : : ReadText() is designed to get the whole answer in 1 loop, then you can check it and ask the user the next question.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : But how the program know when should it increase??&lt;br /&gt;
: : : What is the use of this inc() comment in the crossword??&lt;br /&gt;
: : : &lt;br /&gt;
: : : NO~ I want to get each of the letter in loop,then i can check it one by one and move to next letter if the user entered is right.&lt;br /&gt;
: : : &lt;br /&gt;
: : : layout&lt;br /&gt;
: : : &lt;pre class="sourcecode"&gt;
: : : ###########################################
: : : #     #      #      #      #       #      #
: : : #     #      #      #      #       #      #
: : : ###########################################
: : : &lt;/pre&gt;&lt;br /&gt;
: : : There are 6 boxes, the user need to enter the first letter in the first box and press enter and then check it .If the letter is right ,then (GotoXY) move to next box and enter the second letter......Therefore the coordinateXY of each boxes are different .&lt;br /&gt;
: : : &lt;br /&gt;
: : : So how can the function work in this way??&lt;br /&gt;
: : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : &lt;br /&gt;
: : &lt;br /&gt;
: : ??&lt;br /&gt;
: : &lt;br /&gt;
: I would use the normal KeyPressed/Readkey combination for that:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
:   repeat
:     ch := '';
:     repeat
:       { Show time to user }
:       &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
:         Break;
:       if KeyPressed then
:         ch := ReadKey;
:     until ch &amp;lt;&amp;gt; '';
:     &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
:       Break;
:   until ch = AnswerLetter;
: &lt;/pre&gt;&lt;br /&gt;
: You might want to place this loop into a function with the AnswerLetter as parameter and the user input as result.&lt;br /&gt;
: The red if-thens's need some work. These are to ensure that the user runs out of time during the input.&lt;br /&gt;
: &lt;br /&gt;
I get your point !!&lt;br /&gt;
Am I right??&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
function UserInput (var AnswerLetter:char;X,Y,A,B:integer): string ;
var
TimeLeft,GameStartTime,hint:integer ;
k:char ;
UserEntered : boolean;
begin
GameStartTime := TimeInMin;
repeat
UserInput:='';
  repeat
  TimeLeft:=(3-(TimeInMin-GameStartTime));
  GotoXY(8,34);
  write(TimeLeft);
  if  TimeLeft = 0 then
  begin
  GotoXY(37,23);
  write('Time Up ! You are loss!');
  exitt(k);
  end;
  if keypressed then
  begin
  ch := Readkey ;
  case ch of
      {show answer when user press Tab}
      #9: write('Answer is CLOCK TOWER. (Press ESC to exit)');  
      #13:UserEntered := true;  {User must input the letter then press enter}
      #27: exit ;  {press ESC then exit}

    end;
    while KeyPressed do ReadKey; { Remove extended }
    GotoXY(X,Y); {show the Letter that User entered in the boxes}
    write(ch);
    end;
  until UserEntered; {user press enter}
  if ch &amp;lt;&amp;gt; AnswerLetter then
  Get_hint(hint);
if  TimeLeft = 0 then   {time up then loss}
begin
  GotoXY(37,23);
  write('Time Up ! You are loss!');
  exitt(k);
  end;
until ch = AnswerLetter ;
Textcolor(14);
GotoXY (X,Y);
write(ch);
GotoXY (A,B);   {change color in Display}
write(ch)   ;
end;

&lt;/pre&gt;&lt;br /&gt;
But there are some problem.&lt;br /&gt;
I don't Know why I have'nt pressed enter, the program changed the letter in Display.&lt;br /&gt;
And it can't get hint.&lt;br /&gt;
&lt;br /&gt;
The Gethint procedure is show below:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
procedure Get_hint (var count:integer);
var k:char;
begin
count:=0;
&lt;span style="color: Red;"&gt;if ch &amp;lt;&amp;gt; AnswerLetter then &lt;/span&gt;
count:=count+1;
if count=1 then
GotoXY(9,29);
if count=2 then
GotoXY(9,30);
if count=3 then
GotoXY(9,31);
if count=4 then
GotoXY(37,23);
case count of
1:writeln('Hint 1');
2:writeln('Hint 2');
3:writeln('Hint 3');
end;
if count=4 then   { no chance}
 begin
writeln('You are loss!!') ;
   exitt(k);
   end;
   end;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I don't know why??&lt;br /&gt;
Is it the red statement is wrong??&lt;br /&gt;
&lt;br /&gt;
Thank!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/287788/re-crossword/#287788</guid>
      <pubDate>Fri, 07 Jan 2005 21:33:18 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/288024/re-crossword/#288024</link>
      <description>: : : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:47&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:7&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : THX~&lt;br /&gt;
: : : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : : :   My idea is like that:&lt;br /&gt;
: : : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : Any other method??&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : Inc is short for increase, which should be explained in the help files.&lt;br /&gt;
: : : : : ReadText() is designed to get the whole answer in 1 loop, then you can check it and ask the user the next question.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : : But how the program know when should it increase??&lt;br /&gt;
: : : : What is the use of this inc() comment in the crossword??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : NO~ I want to get each of the letter in loop,then i can check it one by one and move to next letter if the user entered is right.&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : layout&lt;br /&gt;
: : : : &lt;pre class="sourcecode"&gt;
: : : : ###########################################
: : : : #     #      #      #      #       #      #
: : : : #     #      #      #      #       #      #
: : : : ###########################################
: : : : &lt;/pre&gt;&lt;br /&gt;
: : : : There are 6 boxes, the user need to enter the first letter in the first box and press enter and then check it .If the letter is right ,then (GotoXY) move to next box and enter the second letter......Therefore the coordinateXY of each boxes are different .&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : So how can the function work in this way??&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : ??&lt;br /&gt;
: : : &lt;br /&gt;
: : I would use the normal KeyPressed/Readkey combination for that:&lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: :   repeat
: :     ch := '';
: :     repeat
: :       { Show time to user }
: :       &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
: :         Break;
: :       if KeyPressed then
: :         ch := ReadKey;
: :     until ch &amp;lt;&amp;gt; '';
: :     &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
: :       Break;
: :   until ch = AnswerLetter;
: : &lt;/pre&gt;&lt;br /&gt;
: : You might want to place this loop into a function with the AnswerLetter as parameter and the user input as result.&lt;br /&gt;
: : The red if-thens's need some work. These are to ensure that the user runs out of time during the input.&lt;br /&gt;
: : &lt;br /&gt;
: I get your point !!&lt;br /&gt;
: Am I right??&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: function UserInput (var AnswerLetter:char;X,Y,A,B:integer): string ;
: var
: TimeLeft,GameStartTime,hint:integer ;
: k:char ;
: UserEntered : boolean;
: begin
: GameStartTime := TimeInMin;
: repeat
: UserInput:='';
:   repeat
:   TimeLeft:=(3-(TimeInMin-GameStartTime));
:   GotoXY(8,34);
:   write(TimeLeft);
:   if  TimeLeft = 0 then
:   begin
:   GotoXY(37,23);
:   write('Time Up ! You are loss!');
:   exitt(k);
:   end;
:   if keypressed then
:   begin
:   ch := Readkey ;
:   case ch of
:       {show answer when user press Tab}
:       #9: write('Answer is CLOCK TOWER. (Press ESC to exit)');  
:       #13:UserEntered := true;  {User must input the letter then press enter}
:       #27: exit ;  {press ESC then exit}
: 
:     end;
:     while KeyPressed do ReadKey; { Remove extended }
:     GotoXY(X,Y); {show the Letter that User entered in the boxes}
:     write(ch);
:     end;
:   until UserEntered; {user press enter}
:   if ch &amp;lt;&amp;gt; AnswerLetter then
:   Get_hint(hint);
: if  TimeLeft = 0 then   {time up then loss}
: begin
:   GotoXY(37,23);
:   write('Time Up ! You are loss!');
:   exitt(k);
:   end;
: until ch = AnswerLetter ;
: Textcolor(14);
: GotoXY (X,Y);
: write(ch);
: GotoXY (A,B);   {change color in Display}
: write(ch)   ;
: end;
: 
: &lt;/pre&gt;&lt;br /&gt;
: But there are some problem.&lt;br /&gt;
: I don't Know why I have'nt pressed enter, the program changed the letter in Display.&lt;br /&gt;
: And it can't get hint.&lt;br /&gt;
: &lt;br /&gt;
: The Gethint procedure is show below:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: procedure Get_hint (var count:integer);
: var k:char;
: begin
: count:=0;
: &lt;span style="color: Red;"&gt;if ch &amp;lt;&amp;gt; AnswerLetter then &lt;/span&gt;
: count:=count+1;
: if count=1 then
: GotoXY(9,29);
: if count=2 then
: GotoXY(9,30);
: if count=3 then
: GotoXY(9,31);
: if count=4 then
: GotoXY(37,23);
: case count of
: 1:writeln('Hint 1');
: 2:writeln('Hint 2');
: 3:writeln('Hint 3');
: end;
: if count=4 then   { no chance}
:  begin
: writeln('You are loss!!') ;
:    exitt(k);
:    end;
:    end;
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: I don't know why??&lt;br /&gt;
: Is it the red statement is wrong??&lt;br /&gt;
: &lt;br /&gt;
: Thank!!&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
THe Get_Hint will only show the first or no hint, depending on the condition in the red statement. If you run that code in your head and keep track of count as it changes in each line, you will see why.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/288024/re-crossword/#288024</guid>
      <pubDate>Mon, 10 Jan 2005 09:50:51 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/288110/re-crossword/#288110</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-11 8:50:18&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-11 6:14:26&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-11 6:11:48&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:47&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by juice88 at  2005-1-6 7:45:7&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : : : : : : : : i have some questions about crossword ~&lt;br /&gt;
: : : : : : : : : \Please help me!&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 1) How to set the background colour and text colour in pascal??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : 2) I want to know does pascal has this function??&lt;br /&gt;
: : : : : : : : :    if i input the right answer in the game &lt;br /&gt;
: : : : : : : : :    then the colour of text will change to another colour~~&lt;br /&gt;
: : : : : : : : :    How can do this??&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : : Suggest the simplest way to me~&lt;br /&gt;
: : : : : : : : : THZ~&lt;br /&gt;
: : : : : : : : : &lt;br /&gt;
: : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : : 2: Set the new textcolor and write the answer again at the same location.&lt;br /&gt;
: : : : : : : : &lt;br /&gt;
: : : : : : : THX~&lt;br /&gt;
: : : : : : : BUT I Have a error200 &amp;lt;division by zero&amp;gt;  when i set the text colour.&lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : : &lt;br /&gt;
: : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.&lt;br /&gt;
: : : : : : &lt;br /&gt;
: : : : : OK!The problem has been solved.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 2)I think this method is not suitable in my idea.&lt;br /&gt;
: : : : :   My idea is like that:&lt;br /&gt;
: : : : :   I had set a display with many letters for the player to choose them.&lt;br /&gt;
: : : : :   If they choose a right letter, it will change colour.&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : Any other method??&lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : 3)How to set a timer that  count down 30 minutes. &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : : &lt;br /&gt;
: : : : Inc is short for increase, which should be explained in the help files.&lt;br /&gt;
: : : : ReadText() is designed to get the whole answer in 1 loop, then you can check it and ask the user the next question.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : But how the program know when should it increase??&lt;br /&gt;
: : : What is the use of this inc() comment in the crossword??&lt;br /&gt;
: : : &lt;br /&gt;
: : : NO~ I want to get each of the letter in loop,then i can check it one by one and move to next letter if the user entered is right.&lt;br /&gt;
: : : &lt;br /&gt;
: : : layout&lt;br /&gt;
: : : &lt;pre class="sourcecode"&gt;
: : : ###########################################
: : : #     #      #      #      #       #      #
: : : #     #      #      #      #       #      #
: : : ###########################################
: : : &lt;/pre&gt;&lt;br /&gt;
: : : There are 6 boxes, the user need to enter the first letter in the first box and press enter and then check it .If the letter is right ,then (GotoXY) move to next box and enter the second letter......Therefore the coordinateXY of each boxes are different .&lt;br /&gt;
: : : &lt;br /&gt;
: : : So how can the function work in this way??&lt;br /&gt;
: : : &lt;br /&gt;
: : : : &lt;br /&gt;
: : : &lt;br /&gt;
: : &lt;br /&gt;
: : ??&lt;br /&gt;
: : &lt;br /&gt;
: I would use the normal KeyPressed/Readkey combination for that:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
:   repeat
:     ch := '';
:     repeat
:       { Show time to user }
:       &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
:         Break;
:       if KeyPressed then
:         ch := ReadKey;
:     until ch &amp;lt;&amp;gt; '';
:     &lt;span style="color: Red;"&gt;if CurrentTime &amp;gt; EndTime then&lt;/span&gt;
:       Break;
:   until ch = AnswerLetter;
: &lt;/pre&gt;&lt;br /&gt;
: You might want to place this loop into a function with the AnswerLetter as parameter and the user input as result.&lt;br /&gt;
: The red if-thens's need some work. These are to ensure that the user runs out of time during the input.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: THe Get_Hint will only show the first or no hint, depending on the condition in the red statement. If you run that code in your head and keep track of count as it changes in each line, you will see why.&lt;br /&gt;
: &lt;br /&gt;
 Is it because of the code count:=0??&lt;br /&gt;
I have put the declaration count:integer in the heading to becomes the global variable.&lt;br /&gt;
How can I solve it??&lt;br /&gt;
&lt;br /&gt;
How about my first question??&lt;br /&gt;
why I have'nt pressed enter, the program changed color of the letter in Display.&lt;br /&gt;
I want it to change the color after user input right letter~&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/288110/re-crossword/#288110</guid>
      <pubDate>Tue, 11 Jan 2005 06:11:03 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: crossword!!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/281520/288512/re-crossword/#288512</link>
      <description>HIHI~&lt;br /&gt;
I also need to write this program. &lt;br /&gt;
I have some problems need for help.&lt;br /&gt;
Please help me!&lt;br /&gt;
I want to ask that can I use CRT in TB WINDOWS 1.5??&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/281520/288512/re-crossword/#288512</guid>
      <pubDate>Fri, 14 Jan 2005 09:03:38 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>