<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Pascal Forum RSS Feed (Replies Included)</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the 'Pascal' forum at Programmer's Heaven, including replies.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 20:02:25 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 20:02:25 -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>Only a BEEP in WinCE MC9090</title>
      <link>http://www.programmersheaven.com/mb/pasprog/432002/432002/only-a-beep-in-wince-mc9090/</link>
      <description>Hello,&lt;br /&gt;
I am developing an application with Lazarus for Windows CE 5.0 (Motorola / Symbol MC9090).&lt;br /&gt;
I need you to Realize the MC9090 a BEEP with strong volumen.&lt;br /&gt;
With the instruction pascal beep, beep makes very low.&lt;br /&gt;
Can help me how to get a very loud BEEP.&lt;br /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/432002/432002/only-a-beep-in-wince-mc9090/</guid>
      <pubDate>Thu, 09 May 2013 04:22:45 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Only a BEEP in WinCE MC9090</title>
      <link>http://www.programmersheaven.com/mb/pasprog/432001/432001/only-a-beep-in-wince-mc9090/</link>
      <description>Hello,&lt;br /&gt;
I am developing an application with Lazarus for Windows CE 5.0 (Motorola / Symbol MC9090).&lt;br /&gt;
I need you to Realize the MC9090 a BEEP with strong volumen.&lt;br /&gt;
With the instruction pascal beep, beep makes very low.&lt;br /&gt;
Can help me how to get a very loud BEEP.&lt;br /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/432001/432001/only-a-beep-in-wince-mc9090/</guid>
      <pubDate>Thu, 09 May 2013 04:20:55 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Alternative array access</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431967/431967/alternative-array-access/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
just wanted to check if anyone knows about an apparently valid, alternate way to access elements of an array:&lt;br /&gt;
&lt;br /&gt;
instead of myArray[x] it is myArray(.x.)&lt;br /&gt;
&lt;br /&gt;
compiles and works just as well, I´ve just never seen it before, nor read anything about it&lt;br /&gt;
&lt;br /&gt;
does anyone have some info where this is explicitly defined?&lt;br /&gt;
&lt;br /&gt;
Thx,&lt;br /&gt;
&lt;br /&gt;
Jack&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431967/431967/alternative-array-access/</guid>
      <pubDate>Sun, 05 May 2013 07:36:10 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: Code for a multiplication table.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/319234/431960/re-code-for-a-multiplication-table/#431960</link>
      <description>manipulate it to get what you need...&lt;br /&gt;
{ Code for normal multiplication&lt;br /&gt;
}&lt;br /&gt;
program ass8;&lt;br /&gt;
var i,j,store:integer;&lt;br /&gt;
const tab=#9;&lt;br /&gt;
begin&lt;br /&gt;
for i:= 1 to 10 do&lt;br /&gt;
begin&lt;br /&gt;
for j:= 1 to 10 do&lt;br /&gt;
begin&lt;br /&gt;
store:= i*j;&lt;br /&gt;
write(store,tab);&lt;br /&gt;
end;&lt;br /&gt;
writeln();&lt;br /&gt;
end;&lt;br /&gt;
end.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/319234/431960/re-code-for-a-multiplication-table/#431960</guid>
      <pubDate>Fri, 03 May 2013 20:14:32 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: Code for a multiplication table.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/319234/431959/re-code-for-a-multiplication-table/#431959</link>
      <description>manipulate it to get what you need...&lt;br /&gt;
{ Code for normal multiplication&lt;br /&gt;
}&lt;br /&gt;
program ass8;&lt;br /&gt;
var i,j,store:integer;&lt;br /&gt;
const tab=#9;&lt;br /&gt;
begin&lt;br /&gt;
for i:= 1 to 10 do&lt;br /&gt;
begin&lt;br /&gt;
for j:= 1 to 10 do&lt;br /&gt;
begin&lt;br /&gt;
store:= i*j;&lt;br /&gt;
write(store,tab);&lt;br /&gt;
end;&lt;br /&gt;
writeln();&lt;br /&gt;
end;&lt;br /&gt;
end.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/319234/431959/re-code-for-a-multiplication-table/#431959</guid>
      <pubDate>Fri, 03 May 2013 20:12:42 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: Code for a multiplication table.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/319234/431958/re-code-for-a-multiplication-table/#431958</link>
      <description>manipulate it to get what you need...&lt;br /&gt;
{ Code for normal multiplication&lt;br /&gt;
}&lt;br /&gt;
program ass8;&lt;br /&gt;
var i,j,store:integer;&lt;br /&gt;
const tab=#9;&lt;br /&gt;
begin&lt;br /&gt;
for i:= 1 to 10 do&lt;br /&gt;
begin&lt;br /&gt;
for j:= 1 to 10 do&lt;br /&gt;
begin&lt;br /&gt;
store:= i*j;&lt;br /&gt;
write(store,tab);&lt;br /&gt;
end;&lt;br /&gt;
writeln();&lt;br /&gt;
end;&lt;br /&gt;
end.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/319234/431958/re-code-for-a-multiplication-table/#431958</guid>
      <pubDate>Fri, 03 May 2013 20:10:51 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>WTS: New release Apple Iphone 5 and Apple Ipad 4 @ Affordable price</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431893/431893/wts-new-release-apple-iphone-5-and-apple-ipad-4--affordable-price/</link>
      <description>&lt;strong&gt;We have the brand new Apple iPhone 5(Factory Unlocked) 64,32 and 16GB, Black and White SEALED BOX WORKS ANY SIM&lt;br /&gt;
&lt;br /&gt;
Apple iPhone 5 is the thinnest, Lightest iPhone Ever Features all-New aluminum design, and a stunning 4-Inch Retina Display. An Apple-designed A6 chip for blazing fast performance; and ultrafast wireless technology including LTE and DC-HSDPA - all while delivering even better battery life. The iPhone 5 comes with iOS 6, the world's most advanced mobile operating system...&lt;br /&gt;
&lt;br /&gt;
Package content&lt;br /&gt;
1 Apple iPhone 5 Phone&lt;br /&gt;
1 Charger&lt;br /&gt;
1 Data Cable&lt;br /&gt;
1 Handsfree&lt;br /&gt;
1 User's GuidePackage content&lt;br /&gt;
&lt;br /&gt;
warranty : 12 months Original warranty&lt;br /&gt;
&lt;br /&gt;
Also Available instock&lt;br /&gt;
&lt;br /&gt;
Apple iPad 3 with Wi-Fi + 4G(16GB,32GB and 64gb)&lt;br /&gt;
&lt;br /&gt;
The Apple iPad 3 WiFi + 4G 64GB is brand new unlocked never used in box directly from manufactuer comes with full accessories and capable of working any where with any network&lt;br /&gt;
&lt;br /&gt;
Specifications General&lt;br /&gt;
&lt;br /&gt;
Product Type : Tablet&lt;br /&gt;
Width : 7.3 in&lt;br /&gt;
Depth : 0.4 in&lt;br /&gt;
Height : 9.5 in&lt;br /&gt;
Weight : 21.2 oz&lt;br /&gt;
&lt;br /&gt;
warranty : 12 months Original warranty&lt;br /&gt;
&lt;br /&gt;
Feel Free to contact us:&lt;br /&gt;
&lt;br /&gt;
Sales Manager: Syed Ali&lt;br /&gt;
&lt;br /&gt;
Email: info.sayedali@gmail.com&lt;br /&gt;
&lt;br /&gt;
BB PIN 24/7 CHAT: 2737E5A3&lt;br /&gt;
&lt;br /&gt;
Skype: info.sayedali&lt;br /&gt;
&lt;br /&gt;
Tel:  +60136139217&lt;br /&gt;
&lt;br /&gt;
Thanks for your pratonize&lt;/strong&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431893/431893/wts-new-release-apple-iphone-5-and-apple-ipad-4--affordable-price/</guid>
      <pubDate>Thu, 11 Apr 2013 15:13:33 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Stack overflow</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431815/431815/stack-overflow/</link>
      <description>So, i have written recursion which after certain number of calls causes stack overflow. I would like to know if somehow i can avoid this.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
procedure SOLVE (var A : LBOARD; INDEX : integer; var SOLUTION : boolean);
var i : integer;
begin
    if SOLUTION = false
        then if FULL(A)
                 then begin
                         SOLUTION := true;
                         TextColor(10);
                         WriteLn('Possible solution found.');
                         PRINT_CHESSBOARD(A);
                      end
                 else if THERE_ARE_POSSIBLE_MOVES(A)
                          then begin
                                  for i := INDEX downto 1 do
                                     if CAN_BE_MOVED(A, i) and (A[i] = 1)
                                         then begin
                                                 MOVE(A, i);
                                                 RESET(A, i);
                                                 if QUEEN_TO_LEFT(A, i) = 0
                                                     then SOLVE(A, QUEEN_TO_RIGHT(A), SOLUTION)
                                                     else SOLVE(A, QUEEN_TO_LEFT(A,i), SOLUTION);
                                              end;
                               end
        else begin
                TextColor(4);
                WriteLn('No possible solution found.');
             end;
end;
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431815/431815/stack-overflow/</guid>
      <pubDate>Sat, 06 Apr 2013 05:25:03 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Pooh Soro Porject using Dev- Pascal Compiler.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431809/431809/pooh-soro-porject-using-dev--pascal-compiler/</link>
      <description>Hello everyone, My class is having team assignments for the Pooh Sorority project. My group got this for in the lines of code which ill post below. The instructions and the .dat file used in this program are in the zip file i attached to the program. First we need to use functions instead of procedures but procedures tend to work and the functions weren't working for us. If someone could help fix up our code and make it work (i hope we are close) to what the instructions say that would be great. Also some of the comments are either old code we were going to use or maybe. and its supposed to print to a printer but it wont let us cause the teacher assigns hw to his students over topics we haven't discussed yet... Anyways I am using the 64 bit version of dev-Pascal compiler so if it can compile in that crappy compiler then it works for me! thanks for any inputs or help is very much appreciated! &lt;br /&gt;
&lt;br /&gt;
program pooh ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{THIS PROGRAM WILL LOAD THE FILES ON ITS OWN AS LONG AS THEY ARE IN THE DIRECTORY THE APPLICATION IS IN!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
This line causes the runtime error. If you take it out of notes the program will start, get error 2 and close out.&lt;br /&gt;
  }&lt;br /&gt;
 {uses&lt;br /&gt;
printer;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const&lt;br /&gt;
maxnum = 50;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TYPE&lt;br /&gt;
{Memory}&lt;br /&gt;
string20 = string[20];&lt;br /&gt;
jameshetfield = ARRAY [1..3,1..maxnum] of string20;   {I AM THE TABLE!}&lt;br /&gt;
&lt;br /&gt;
VAR&lt;br /&gt;
&lt;br /&gt;
{---------------&lt;br /&gt;
Input variables}&lt;br /&gt;
poohlist : text ;{The original file being opened}&lt;br /&gt;
poohsave : text ;{The new file being save}&lt;br /&gt;
poohprint : text; {this prints the file}&lt;br /&gt;
how : string;&lt;br /&gt;
&lt;br /&gt;
DataFile : String ;{Asks what the name of the file you want to open is, scrapped}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{-------------------&lt;br /&gt;
Processing variables}&lt;br /&gt;
&lt;br /&gt;
firstname : string; {names}&lt;br /&gt;
lastname : string;    {could be one variable but whatever}&lt;br /&gt;
&lt;br /&gt;
Complex : string;  {Complexion}&lt;br /&gt;
&lt;br /&gt;
Height : string;     {height}&lt;br /&gt;
&lt;br /&gt;
Trait : string;       {trait}&lt;br /&gt;
lucker : string;      {lucky}&lt;br /&gt;
Age : integer;         {sage}&lt;br /&gt;
&lt;br /&gt;
lucky : boolean;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 directory : string;&lt;br /&gt;
readingglasses : char; {reads the characters individually to check for spaces}&lt;br /&gt;
&lt;br /&gt;
{counters}&lt;br /&gt;
readcount : integer;&lt;br /&gt;
totreadcount : integer;&lt;br /&gt;
totlucky : integer;&lt;br /&gt;
tot : integer;&lt;br /&gt;
counter : integer;&lt;br /&gt;
totper : real;&lt;br /&gt;
dashcounter : integer;&lt;br /&gt;
totletter : integer;&lt;br /&gt;
&lt;br /&gt;
{----------------&lt;br /&gt;
Output variables}&lt;br /&gt;
&lt;br /&gt;
poohtable : jameshetfield;    {table}&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;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{----------------------------&lt;br /&gt;
GET FILE DIRECTORY&lt;br /&gt;
----------------------------}&lt;br /&gt;
procedure getdirectory;&lt;br /&gt;
begin&lt;br /&gt;
{gets exact file location AND name}&lt;br /&gt;
 directory := ParamStr(0);&lt;br /&gt;
&lt;br /&gt;
{Getting how long the string is}&lt;br /&gt;
totletter := length(directory);&lt;br /&gt;
&lt;br /&gt;
{Subtractng the file name (pooh.pas) from the directory}&lt;br /&gt;
dashcounter := totletter - 8;&lt;br /&gt;
delete(directory, dashcounter, 9);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
end;&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;
&lt;br /&gt;
&lt;br /&gt;
{----------------------------&lt;br /&gt;
GET FILE NAME PROCEDURE&lt;br /&gt;
----------------------------}&lt;br /&gt;
&lt;br /&gt;
{Getting the filename instead of hardcoding it}&lt;br /&gt;
procedure getfile;&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
assign(poohlist,directory+'\pooh.dat');&lt;br /&gt;
&lt;br /&gt;
assign(poohsave,directory+'\luckyornot.dat');&lt;br /&gt;
&lt;br /&gt;
rewrite(poohsave);&lt;br /&gt;
reset(poohlist);&lt;br /&gt;
end;&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;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{----------------------------&lt;br /&gt;
GET FIRST AND LAST NAME PROCEDURE&lt;br /&gt;
----------------------------}&lt;br /&gt;
procedure getname;&lt;br /&gt;
begin&lt;br /&gt;
{clearing variables}&lt;br /&gt;
readcount := 0;&lt;br /&gt;
totreadcount := 0;&lt;br /&gt;
lastname := '';&lt;br /&gt;
firstname := '';&lt;br /&gt;
&lt;br /&gt;
{GETTING FIRST NAME}&lt;br /&gt;
readingglasses := 'k';&lt;br /&gt;
WHILE (readingglasses &amp;lt;&amp;gt; ' ') DO&lt;br /&gt;
begin&lt;br /&gt;
read(poohlist, readingglasses);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{Seeing if the name is done}&lt;br /&gt;
if (readingglasses &amp;lt;&amp;gt;  ' ') THEN&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
{Making sure it's 20 characters}&lt;br /&gt;
if readcount &amp;lt;&amp;gt; 20 THEN&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
{adding each character individually, and counting the characters}&lt;br /&gt;
insert(readingglasses,firstname,(readcount + 1));&lt;br /&gt;
readcount := readcount + 1;&lt;br /&gt;
totreadcount := totreadcount + 1;&lt;br /&gt;
end;&lt;br /&gt;
end;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{GETTING LAST NAME}&lt;br /&gt;
readcount := 0;&lt;br /&gt;
&lt;br /&gt;
readingglasses := 'k';&lt;br /&gt;
WHILE (readingglasses &amp;lt;&amp;gt; ' ') DO&lt;br /&gt;
begin&lt;br /&gt;
read(poohlist, readingglasses);&lt;br /&gt;
&lt;br /&gt;
{Seeing if the name is done}&lt;br /&gt;
if (readingglasses &amp;lt;&amp;gt; ' ') THEN&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
{Making sure it's 20 characters}&lt;br /&gt;
IF totreadcount &amp;lt;&amp;gt; 20 THEN&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
{adding each character individually, and counting the characters}&lt;br /&gt;
insert(readingglasses,lastname,(readcount + 1));&lt;br /&gt;
readcount := readcount + 1;&lt;br /&gt;
totreadcount := totreadcount + 1;&lt;br /&gt;
end&lt;br /&gt;
end;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
end;&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;
&lt;br /&gt;
&lt;br /&gt;
{----------------------------&lt;br /&gt;
CALCULATING IF LUCKY OR NOT&lt;br /&gt;
----------------------------}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
procedure islucky;&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
height := '';&lt;br /&gt;
age := 0;&lt;br /&gt;
complex := '';&lt;br /&gt;
trait := '';&lt;br /&gt;
&lt;br /&gt;
{Reading  complex}&lt;br /&gt;
readingglasses := 'k';&lt;br /&gt;
WHILE (readingglasses &amp;lt;&amp;gt; ' ') DO&lt;br /&gt;
begin&lt;br /&gt;
read(poohlist, readingglasses);&lt;br /&gt;
readcount := readcount + 1;&lt;br /&gt;
insert(readingglasses,complex,(readcount));&lt;br /&gt;
end ;&lt;br /&gt;
&lt;br /&gt;
{Reading  height}&lt;br /&gt;
readingglasses := 'k';&lt;br /&gt;
WHILE (readingglasses &amp;lt;&amp;gt; ' ') DO&lt;br /&gt;
begin&lt;br /&gt;
read(poohlist, readingglasses);&lt;br /&gt;
readcount := readcount + 1;&lt;br /&gt;
insert(readingglasses,height,(readcount));&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
{Reading  trait}&lt;br /&gt;
readingglasses := 'k';&lt;br /&gt;
WHILE (readingglasses &amp;lt;&amp;gt; ' ') DO&lt;br /&gt;
begin&lt;br /&gt;
read(poohlist, readingglasses);&lt;br /&gt;
readcount := readcount + 1;&lt;br /&gt;
insert(readingglasses,trait,(readcount));&lt;br /&gt;
end ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{Reading  age}&lt;br /&gt;
{WHILE NOT eoln(poohlist) DO&lt;br /&gt;
begin    }&lt;br /&gt;
readln(poohlist, age);&lt;br /&gt;
{end ; }&lt;br /&gt;
&lt;br /&gt;
lucky := ((height = 'Tall') AND (trait = 'Handsome') AND (complex &amp;lt;&amp;gt; 'Dark') AND ((Age &amp;gt; 20) AND (Age &amp;lt; 30)))&lt;br /&gt;
OR ((((trait = 'Timit') or (height = 'Medium') or (complex &amp;lt;&amp;gt; 'Whitish')) AND ((age &amp;lt; 22) OR (age &amp;gt; 28)))&lt;br /&gt;
and NOT ((height = 'small') and (trait = 'Aggressive') and (age &amp;gt; 65))&lt;br /&gt;
and not ((trait = 'Timid') AND (trait = 'Tall') and (age &amp;lt; 16)));&lt;br /&gt;
&lt;br /&gt;
totlucky := totlucky + ord(lucky);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{----------------------------&lt;br /&gt;
SAVING TO TABLE&lt;br /&gt;
----------------------------}&lt;br /&gt;
procedure savetojames;&lt;br /&gt;
begin&lt;br /&gt;
poohtable[1][tot] := firstname;&lt;br /&gt;
 poohtable[2,tot] := lastname;&lt;br /&gt;
 if(lucky) THEN&lt;br /&gt;
 poohtable[3,tot] := 'Lucky'&lt;br /&gt;
 else&lt;br /&gt;
 poohtable[3,tot] := 'Unlucky';&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
end;&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;
WRITING TO FILE&lt;br /&gt;
----------------------------}&lt;br /&gt;
procedure writetofile;&lt;br /&gt;
begin&lt;br /&gt;
          {I had to add Flush to make sure it wrote ALL of the words, because it would stop halfway through. I'm not sure if we learned this yet}&lt;br /&gt;
 counter := 1;&lt;br /&gt;
 writeln(poohsave,'Pooh Project');&lt;br /&gt;
 writeln(poohsave,'Group 1');&lt;br /&gt;
  writeln(poohsave,'CIS 136 30');&lt;br /&gt;
 writeln(poohsave);&lt;br /&gt;
 writeln(poohsave,'Last name':10, '|' , 'First name':10, '|', 'Lucky?':10);&lt;br /&gt;
writeln(poohsave,'==============================='
);&lt;br /&gt;
Flush(poohsave);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
while counter &amp;lt; tot do&lt;br /&gt;
begin&lt;br /&gt;
writeln(poohsave,poohtable[1,counter]:10 ,poohtable[2,counter]:10, poohtable[3,counter]:10);&lt;br /&gt;
Flush(poohsave);&lt;br /&gt;
counter := counter + 1;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
totper := totlucky DIV tot;&lt;br /&gt;
&lt;br /&gt;
writeln(poohsave, 'Total lucky: ', totlucky);&lt;br /&gt;
writeln(poohsave, 'Total unlucky: ', (totlucky - tot));&lt;br /&gt;
writeln(poohsave, 'Total suitors: ', tot);&lt;br /&gt;
writeln(poohsave, 'Percentage lucky: ', (100 - totper*10):3:0, '%');&lt;br /&gt;
writeln(poohsave, 'Percentage unlucky: ', (totper*10):3:0, '%');&lt;br /&gt;
Flush(poohsave);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 {----------------------------&lt;br /&gt;
WRITING TO SCREEN&lt;br /&gt;
----------------------------}&lt;br /&gt;
procedure writetoscreen;&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
 writeln('Last name':10, '|' , 'First name':10, '|', 'Lucky?':10);&lt;br /&gt;
writeln('===============================');&lt;br /&gt;
 counter := 1;&lt;br /&gt;
while counter &amp;lt; tot do&lt;br /&gt;
begin&lt;br /&gt;
writeln(poohtable[1,counter]:10 ,poohtable[2,counter]:10, poohtable[3,counter]:10);&lt;br /&gt;
counter := counter + 1;&lt;br /&gt;
end;&lt;br /&gt;
writeln;&lt;br /&gt;
&lt;br /&gt;
writeln('Total lucky: ', totlucky);&lt;br /&gt;
writeln('Total ulucky: ', (tot - totlucky));&lt;br /&gt;
writeln('Total suitors: ', tot);&lt;br /&gt;
writeln('Percentage lucky: ', (100 - totper*10):3:0, '%');&lt;br /&gt;
writeln('Percentage unlucky: ', (totper*10):3:0, '%');&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 {----------------------------&lt;br /&gt;
PRINTING&lt;br /&gt;
I couldn't finish writing this because I couldn't even be able to load the printer.&lt;br /&gt;
----------------------------}&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 procedure  writetoprinter;&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    counter := 1;&lt;br /&gt;
 writeln(lst,'Pooh Project');&lt;br /&gt;
 writeln(poohprint,'Group 1');&lt;br /&gt;
  writeln(poohprint,'CIS 136 30');&lt;br /&gt;
 writeln(poohprint);&lt;br /&gt;
 writeln(poohprint,'Last name':10, '|' , 'First name':10, '|', 'Lucky?':10);&lt;br /&gt;
writeln(poohprint,'===============================
');&lt;br /&gt;
Flush(poohprint);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
while counter &amp;lt; tot do&lt;br /&gt;
begin&lt;br /&gt;
writeln(poohprint,poohtable[1,counter]:10 ,poohtable[2,counter]:10, poohtable[3,counter]:10);&lt;br /&gt;
Flush(poohprint);&lt;br /&gt;
counter := counter + 1;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
totper := totlucky DIV tot;&lt;br /&gt;
&lt;br /&gt;
writeln(poohprint, 'Total lucky: ', totlucky);&lt;br /&gt;
writeln(poohprint, 'Total unlucky: ', (totlucky - tot));&lt;br /&gt;
writeln(poohprint, 'Total suitors: ', tot);&lt;br /&gt;
writeln(poohprint, 'Percentage lucky: ', (100 - totper*10):3:0, '%');&lt;br /&gt;
writeln(poohprint, 'Percentage unlucky: ', (totper*10):3:0, '%');&lt;br /&gt;
Flush(poohprint);&lt;br /&gt;
close(poohprint);&lt;br /&gt;
end;&lt;br /&gt;
}&lt;br /&gt;
{----------------------------&lt;br /&gt;
MAIN PROGRAM&lt;br /&gt;
----------------------------}&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
{assign(lst,'lpt1' );   }&lt;br /&gt;
getdirectory;&lt;br /&gt;
getfile;&lt;br /&gt;
&lt;br /&gt;
While NOT eof(poohlist) DO&lt;br /&gt;
Begin&lt;br /&gt;
While NOT eoln(poohlist) DO&lt;br /&gt;
begin&lt;br /&gt;
tot := tot + 1;&lt;br /&gt;
{Processing the data}&lt;br /&gt;
getname;&lt;br /&gt;
islucky;&lt;br /&gt;
&lt;br /&gt;
{Saving the data}&lt;br /&gt;
Savetojames;&lt;br /&gt;
end;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{asking how it wants to be presented}&lt;br /&gt;
DataFile := 'dfds';&lt;br /&gt;
writeln('How do you want to be given the data? Print to screen (types s), write to file (type f), or print on a printer (type p)?)');&lt;br /&gt;
while datafile &amp;lt;&amp;gt;  'k' DO&lt;br /&gt;
begin&lt;br /&gt;
readln(how);&lt;br /&gt;
&lt;br /&gt;
{Screen?}&lt;br /&gt;
if how = 's'  THEN&lt;br /&gt;
begin&lt;br /&gt;
writetoscreen;&lt;br /&gt;
datafile := 'k';&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
{File?}&lt;br /&gt;
else if how = 'f' THEN&lt;br /&gt;
begin&lt;br /&gt;
write('Written to: ', directory+'\luckyornot.dat');&lt;br /&gt;
writetofile;&lt;br /&gt;
datafile := 'k';&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
{Printer?}&lt;br /&gt;
else if how = 'p' THEN&lt;br /&gt;
begin&lt;br /&gt;
write('Printed');&lt;br /&gt;
datafile := 'k';&lt;br /&gt;
{writetoprinter;  }&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
{Hello. My name is error}&lt;br /&gt;
else&lt;br /&gt;
writeln('Could not understand, input should be one of the following: s  f  p');&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
readln();&lt;br /&gt;
Close(poohsave);&lt;br /&gt;
Close(poohlist);&lt;br /&gt;
end.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431809/431809/pooh-soro-porject-using-dev--pascal-compiler/</guid>
      <pubDate>Fri, 05 Apr 2013 13:38:39 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: Loop repeating even though got correct guess</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431781/431792/re-loop-repeating-even-though-got-correct-guess/#431792</link>
      <description>&lt;pre class="sourcecode"&gt;
   function playgame()  :  Integer ;
   
   var 
      target, gnum,  guess :  Integer ;
      guessed              :  Boolean ;
   
   begin
      gnum     := 0 ;
      target   := Random(2) + 1 ;
      guessed  := false ;
    
      Repeat 
         gnum :=  gnum + 1 ;
         Write('Guess', ' ', gnum, ':') ; 
         
         // gnum :=  gnum + 1 ;
         // Write('Guess', ' ', gnum, ':') ;
         guess := ReadIntegerRange(1, 100) ;
         if guess &amp;gt; target then begin
            WriteLn('The number is smaller then ', guess)
         end
         else if guess &amp;lt; target then begin
            WriteLn('The number is larger then ', guess)
         end
         else begin 
            WriteLn('Well Done .. the number was .. ', guess) ;
            guessed := True
         end
      until (guessed = true) or (gnum &amp;gt;= 7)
   end ;    //until guess = target ;
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431781/431792/re-loop-repeating-even-though-got-correct-guess/#431792</guid>
      <pubDate>Fri, 05 Apr 2013 01:26:46 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Loop repeating even though got correct guess</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431781/431781/loop-repeating-even-though-got-correct-guess/</link>
      <description>My loop is keep repeating even though i got correct guess how do i solve that ??&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2590"&gt;g.pas&lt;/a&gt; (1618 bytes | downloaded 29 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431781/431781/loop-repeating-even-though-got-correct-guess/</guid>
      <pubDate>Thu, 04 Apr 2013 04:17:41 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>help with this program!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431743/431743/help-with-this-program/</link>
      <description>hello everyone, I am having problems with this program, I don´t know where is the problem. It´s function is to read a txt. So could yo help me?&lt;br /&gt;
&lt;br /&gt;
this is the program:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;program leerarchivo;

const

se='/';

type

  jugadores =(Jugador,CPU1,CPU2,CPU3,CPU4,CPU5);

  estado= (activo,eliminado); // estados de los jugadores en la partida

 mazo= (Biblioteca,Cocina,Comedor,Estudio,Vestibulo,Salon
,
        Invernadero,SalaDeBaile,SalaDeBillar,SenioraBlanco
,
        SenioraCeleste,ProfesorCiruela,SenioritaEscarlata,
CoronelMostaza,
        SeniorVerde,Candelabro,Cuchillo,Cuerda,LlaveIngles
a,Revolver,Tubo);

 lugares= Biblioteca..SalaDeBillar;

 personajes= SenioraBlanco..SeniorVerde;

 armas = Candelabro..Tubo;

 tablero= array [1..5] of array [1..5] of lugares;

 sobre= array [1..3] of mazo;

 manos= array [1..6] of array [jugadores] of mazo;

 listas= array [jugadores] of array [mazo] of boolean; //Lista de sospechosos

 posibles=array [1..9] of lugares;

 arreglo_cartas= array[1..18] of mazo;

 fichaTec=record // Datos de los participantes
  peon : personajes; // peon del jugador
  ubicacion:lugares; // ubicacion del jugador
  estatus: estado; // estado del jugador
  end;

 fichas = array [jugadores] of fichaTec;


var

lugar:tablero;
    Crimen:sobre;
  culpable:personajes;
  arma:armas;
  escena:lugares;
  J1:fichas;
  baraja:mazo;
  mano:manos;
  ultjug:jugadores;
  gameover:boolean;
  lista:listas;
  numjug:integer;
  jugact:jugadores;
  var arreglo:arreglo_cartas;
  ganador:boolean;
  resp:(acusar,sospechar);
  nombreArchivo:string;
  resp2:(guardar,jugar);
  i:mazo;
  contador:integer;
  archivo:text;

  numcartas: array[jugadores] of integer;
  numlistas:array [jugadores] of integer;
  control:integer;
  dum:string;
  temp:array [jugadores] of array [1..21] of mazo;
  afg:integer;
  jugturno:personajes;
  tur:jugadores;

begin

	writeln;
	writeln('lectura de archivo');
	writeln;
	writeln('introduzca el nombre de la partida');
	readln(nombreArchivo);

	assign(archivo,nombreArchivo);
	reset(archivo);

	while not eof (archivo) do begin


		readln(archivo,numjug);

		if numjug=3 then begin

			readln(archivo,crimen[1],crimen[2],crimen[3]);
	
			readln(archivo,j1[jugador].peon,j1[jugador].estatu
s,j1[jugador].ubicacion,numcartas[jugador],numlist
as[jugador]);

			for control:=1 to numcartas[jugador] do read(archivo,mano[control][jugador]);	
			readln(archivo,dum);				
			for control:=1 to numlistas[jugador] do read(archivo,temp[jugador][control]);
			readln(archivo,dum);

			readln(archivo,j1[cpu1].peon,j1[cpu1].estatus,j1[c
pu1].ubicacion,numcartas[cpu1],numlistas[cpu1]);
			if j1[cpu1].estatus=activo then begin
				for control:=1 to numcartas[cpu1] do read(archivo,mano[control][cpu1]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end;
			
			readln(archivo,j1[cpu2].peon,j1[cpu2].estatus,j1[c
pu2].ubicacion,numcartas[cpu2],numlistas[cpu2]);
			if j1[cpu2].estatus=activo then begin
				for control:=1 to numcartas[cpu2] do read(archivo,mano[control][cpu2]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end;

			readln(archivo,jugturno);

			for tur:=jugador to cpu2 do begin
				if j1[tur].peon=jugturno then jugact:=tur;
			end;

			for control:=1 to numlistas[jugador] do lista[jugador][temp[jugador][control]]:=true;
			for control:=1 to numlistas[cpu1] do lista[cpu1][temp[cpu1][control]]:=true;
			for control:=1 to numlistas[cpu2] do lista[cpu2][temp[cpu2][control]]:=true;
		end
		
		else if numjug=4 then begin

			readln(archivo,crimen[1],crimen[2],crimen[3]);
			readln(archivo,j1[jugador].peon,j1[jugador].estatu
s,j1[jugador].ubicacion,numcartas[jugador],numlist
as[jugador]);
			for control:=1 to numcartas[jugador] do read(archivo,mano[control][jugador]);	
			readln(archivo,dum);				
			for control:=1 to numlistas[jugador] do read(archivo,temp[jugador][control]);
			readln(archivo,dum);

			readln(archivo,j1[cpu1].peon,j1[cpu1].estatus,j1[c
pu1].ubicacion,numcartas[cpu1],numlistas[cpu1]);
			if j1[cpu1].estatus=activo then begin
				for control:=1 to numcartas[cpu1] do read(archivo,mano[control][cpu1]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end;

			readln(archivo,j1[cpu2].peon,j1[cpu2].estatus,j1[c
pu2].ubicacion,numcartas[cpu2],numlistas[cpu2]);
			if j1[cpu2].estatus=activo then begin
				for control:=1 to numcartas[cpu2] do read(archivo,mano[control][cpu2]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end;
			
			readln(archivo,j1[cpu3].peon,j1[cpu3].estatus,j1[c
pu3].ubicacion,numcartas[cpu3],numlistas[cpu3]);
			if j1[cpu3].estatus=activo then begin
				for control:=1 to numcartas[cpu3] do read(archivo,mano[control][cpu3]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu3] do read(archivo,temp[cpu3][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu3] do read(archivo,temp[cpu3][control]);
				readln(archivo,dum);
			end;

			readln(archivo,jugturno);

			for tur:=jugador to cpu3 do begin
				if j1[tur].peon=jugturno then jugact:=tur;
			end;

			for control:=1 to numlistas[jugador] do lista[jugador][temp[jugador][control]]:=true;
			for control:=1 to numlistas[cpu1] do lista[cpu1][temp[cpu1][control]]:=true;
			for control:=1 to numlistas[cpu2] do lista[cpu2][temp[cpu2][control]]:=true;
			for control:=1 to numlistas[cpu3] do lista[cpu3][temp[cpu3][control]]:=true;


		end	

		else if numjug=5 then begin

			readln(archivo,crimen[1],crimen[2],crimen[3]);
			
			readln(archivo,crimen[1],crimen[2],crimen[3]);
			readln(archivo,j1[jugador].peon,j1[jugador].estatu
s,j1[jugador].ubicacion,numcartas[jugador],numlist
as[jugador]);
			for control:=1 to numcartas[jugador] do read(archivo,mano[control][jugador]);	
			readln(archivo,dum);				
			for control:=1 to numlistas[jugador] do read(archivo,temp[jugador][control]);
			readln(archivo,dum);

			readln(archivo,j1[cpu1].peon,j1[cpu1].estatus,j1[c
pu1].ubicacion,numcartas[cpu1],numlistas[cpu1]);
			if j1[cpu1].estatus=activo then begin
				for control:=1 to numcartas[cpu1] do read(archivo,mano[control][cpu1]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end;

			readln(archivo,j1[cpu2].peon,j1[cpu2].estatus,j1[c
pu2].ubicacion,numcartas[cpu2],numlistas[cpu2]);
			if j1[cpu2].estatus=activo then begin
				for control:=1 to numcartas[cpu2] do read(archivo,mano[control][cpu2]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end;

			
			readln(archivo,j1[cpu3].peon,j1[cpu3].estatus,j1[c
pu3].ubicacion,numcartas[cpu3],numlistas[cpu3]);
			if j1[cpu3].estatus=activo then begin
				for control:=1 to numcartas[cpu3] do read(archivo,mano[control][cpu3]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu3] do read(archivo,temp[cpu3][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu3] do read(archivo,temp[cpu3][control]);
				readln(archivo,dum);
			end;
			
			readln(archivo,j1[cpu4].peon,j1[cpu4].estatus,j1[c
pu4].ubicacion,numcartas[cpu4],numlistas[cpu4]);
			if j1[cpu4].estatus=activo then begin
				for control:=1 to numcartas[cpu4] do read(archivo,mano[control][cpu4]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu4] do read(archivo,temp[cpu4][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu4] do read(archivo,temp[cpu4][control]);
				readln(archivo,dum);
			end;

			readln(archivo,jugturno);

			for tur:=jugador to cpu4 do begin
				if j1[tur].peon=jugturno then jugact:=tur;
			end;
			
			for control:=1 to numlistas[jugador] do lista[jugador][temp[jugador][control]]:=true;
			for control:=1 to numlistas[cpu1] do lista[cpu1][temp[cpu1][control]]:=true;
			for control:=1 to numlistas[cpu2] do lista[cpu2][temp[cpu2][control]]:=true;
			for control:=1 to numlistas[cpu3] do lista[cpu3][temp[cpu3][control]]:=true;
			for control:=1 to numlistas[cpu4] do lista[cpu3][temp[cpu4][control]]:=true;


		end	

		else if numjug=6 then begin

			readln(archivo,crimen[1],crimen[2],crimen[3]);
	
			readln(archivo,crimen[1],crimen[2],crimen[3]);
			readln(archivo,j1[jugador].peon,j1[jugador].estatu
s,j1[jugador].ubicacion,numcartas[jugador],numlist
as[jugador]);
			for control:=1 to numcartas[jugador] do read(archivo,mano[control][jugador]);	
			readln(archivo,dum);				
			for control:=1 to numlistas[jugador] do read(archivo,temp[jugador][control]);
			readln(archivo,dum);

			readln(archivo,j1[cpu1].peon,j1[cpu1].estatus,j1[c
pu1].ubicacion,numcartas[cpu1],numlistas[cpu1]);
			if j1[cpu1].estatus=activo then begin
				for control:=1 to numcartas[cpu1] do read(archivo,mano[control][cpu1]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu1] do read(archivo,temp[cpu1][control]);
				readln(archivo,dum);
			end;

			readln(archivo,j1[cpu2].peon,j1[cpu2].estatus,j1[c
pu2].ubicacion,numcartas[cpu2],numlistas[cpu2]);
			if j1[cpu2].estatus=activo then begin
				for control:=1 to numcartas[cpu2] do read(archivo,mano[control][cpu2]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu2] do read(archivo,temp[cpu2][control]);
				readln(archivo,dum);
			end;
			
			readln(archivo,j1[cpu3].peon,j1[cpu3].estatus,j1[c
pu3].ubicacion,numcartas[cpu3],numlistas[cpu3]);
			if j1[cpu3].estatus=activo then begin
				for control:=1 to numcartas[cpu3] do read(archivo,mano[control][cpu3]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu3] do read(archivo,temp[cpu3][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu3] do read(archivo,temp[cpu3][control]);
				readln(archivo,dum);
			end;
			
			readln(archivo,j1[cpu4].peon,j1[cpu4].estatus,j1[c
pu4].ubicacion,numcartas[cpu4],numlistas[cpu4]);
			if j1[cpu4].estatus=activo then begin
				for control:=1 to numcartas[cpu4] do read(archivo,mano[control][cpu4]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu4] do read(archivo,temp[cpu4][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu4] do read(archivo,temp[cpu4][control]);
				readln(archivo,dum);
			end;

			readln(archivo,j1[cpu5].peon,j1[cpu5].estatus,j1[c
pu5].ubicacion,numcartas[cpu5],numlistas[cpu5]);
			if j1[cpu5].estatus=activo then begin
				for control:=1 to numcartas[cpu5] do read(archivo,mano[control][cpu5]);	
				readln(archivo,dum);				
				for control:=1 to numlistas[cpu5] do read(archivo,temp[cpu5][control]);
				readln(archivo,dum);
			end
			else begin
				readln(archivo,dum);
				for control:=1 to numlistas[cpu5] do read(archivo,temp[cpu5][control]);
				readln(archivo,dum);
			end;

			readln(archivo,jugturno);
			
			for tur:=jugador to cpu5 do begin
				if j1[tur].peon=jugturno then jugact:=tur;
			end;

			for control:=1 to numlistas[jugador] do lista[jugador][temp[jugador][control]]:=true;
			for control:=1 to numlistas[cpu1] do lista[cpu1][temp[cpu1][control]]:=true;
			for control:=1 to numlistas[cpu2] do lista[cpu2][temp[cpu2][control]]:=true;
			for control:=1 to numlistas[cpu3] do lista[cpu3][temp[cpu3][control]]:=true;
			for control:=1 to numlistas[cpu4] do lista[cpu3][temp[cpu4][control]]:=true;
			for control:=1 to numlistas[cpu5] do lista[cpu5][temp[cpu5][control]]:=true;

		end;	
	end;
	
	close(archivo);

	writeln('hola');
	readln;

end.	&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And this is the txt:&lt;br /&gt;
&lt;br /&gt;
5													&lt;br /&gt;
	ProfesorCiruela	LlaveInglesa	Cocina											&lt;br /&gt;
	SenioritaEscarlata	activo	Cocina	4	14									&lt;br /&gt;
	Estudio	SalaDeBaile	SenioraBlanco	Candelabro										&lt;br /&gt;
	Vestibulo	Salon	SenioraCeleste	Cuchillo	SalaDeBillar	Biblioteca	SeniorVerde	Tubo	Invernadero	SenioritaEscarlata	Cuerda	Comedor	CoronelMostaza	Revolver&lt;br /&gt;
	CoronelMostaza	activo	Estudio	5	9									&lt;br /&gt;
	Vestibulo	Salon	SenioraCeleste	Cuchillo	Comedor									&lt;br /&gt;
	Estudio	SalaDeBaile	SenioraBlanco	Candelabro	SalaDeBillar	Biblioteca	SeniorVerde	Tubo	CoronelMostaza					&lt;br /&gt;
	SenioraBlanco	activo	Vestibulo	5	9									&lt;br /&gt;
	SalaDeBillar	Biblioteca	SeniorVerde	Tubo	CoronelMostaza									&lt;br /&gt;
	Estudio	SalaDeBaile	SenioraBlanco	Candelabro	Vestibulo	Salon	SenioraCeleste	Cuchillo	Comedor					&lt;br /&gt;
	SenioraCeleste	activo	SalaDeBillar	4	9									&lt;br /&gt;
	Invernadero	SenioritaEscarlata	Cuerda	Revolver										&lt;br /&gt;
	Estudio	SalaDeBaile	SenioraBlanco	Candelabro	Vestibulo	Salon	SenioraCeleste	Cuchillo	Comedor					&lt;br /&gt;
	SeniorVerde	eliminado	Invernadero	0	14									&lt;br /&gt;
&lt;br /&gt;
	Vestibulo	Salon	SenioraCeleste	Cuchillo	SalaDeBillar	Biblioteca	SeniorVerde	Tubo	Invernadero	SenioritaEscarlata	Cuerda	Comedor	CoronelMostaza	Revolver&lt;br /&gt;
	CoronelMostaza	&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431743/431743/help-with-this-program/</guid>
      <pubDate>Fri, 29 Mar 2013 09:01:07 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>recursion (backtracking) problem, knight coverings</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431711/431711/recursion-backtracking-problem-knight-coverings/</link>
      <description>hello everyone,&lt;br /&gt;
i have problems with this program and i am praying for your help.&lt;br /&gt;
The task is to put given number of knights, on given size chess board, that every square of the board is covered. That is, every square on the board is either occupied by a knight or attacked by a knight. knights can attack each other. the solutions are givven here. &lt;a href="http://www.contestcen.com/knight.htm"&gt;&lt;/a&gt;&lt;br /&gt;
i am using recursion. algorithm:&lt;br /&gt;
1. choose not occupied square&lt;br /&gt;
2. try every knight, which can occupy that square&lt;br /&gt;
3. choose another square and so on, till knight max number is reached.&lt;br /&gt;
basicly, i try every posibble knight positions.&lt;br /&gt;
i wrote program, which is below, but it crashes when i put more than 6 knights, and show nonsense in boards below 6. i know that the problem is in backtracking, when i need to delete a knight. but i dont know how to correct it.&lt;br /&gt;
again, praying for your help. Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;program zirgai;
uses crt;
type lenta = array[1..8,1..8] of char;
     ejimai = array[1..8] of integer;
var L:lenta;
    N,M,Grizti:ejimai;
    zirgu_sk,dydis,r:integer;
//******************************//
procedure nulinimas(var L:lenta; d:integer);
var x,y:integer;
begin
for x:=1 to d do
    begin
    for y:=1 to d do
        begin
        L[x,y]:='0';
        end;
    end;
end;
//******************************//
procedure tikrinimas(L:lenta; d:integer; var r:integer);
var x,y:integer;
begin
r:=1;
for x:=1 to d do
    begin
    for y:=1 to d do
        begin
        if L[x,y]='0' then begin r:=0; break; end;
        end;
    if L[x,y]='0' then begin r:=0; break; end;
    end;
end;
//******************************//
procedure braizyti(L:lenta; d:integer);
var x1,x2,y1,y2,counter,x,y:integer;
begin
counter:=1;
y1:=1;
y2:=3;
    for x:=1 to d do                                          // draws a chess board
    begin
    x1:=1;
    x2:=5;
        for y:=1 to d do
        begin
        window(x1,y1,x2,y2);
        if (counter mod 2) = 0 then textbackground(red)
        else textbackground(green);
        clrscr;
        writeln;
        writeln('  ',L[x,y]);
        counter:=counter+1;
        x1:=x1+5;
        x2:=x2+5;
        end;
    y1:=y1+3;
    y2:=y2+3;
    if (d mod 2) = 0 then counter:=counter+1;
    end;
end;
//******************************//
procedure Delioti(zirgas,x,y:integer);
var i,z:integer;
begin
tikrinimas(L,dydis,r);
if r=1 then
begin
writeln('done');                    // checks if all sqaures are covered
braizyti(L,dydis);
readln;
exit;
end;
//////////////////////////////////////////////////
/////////
    if (x&amp;lt;&amp;gt;1) and (y&amp;lt;&amp;gt;1) and (zirgas&amp;lt;&amp;gt;0) then
    begin
        if (x&amp;gt;=1) and (y&amp;gt;=1) and (x&amp;lt;=dydis) and (y&amp;lt;=dydis) then
        begin
        L[x,y]:='Z';                                                                             // puts knight, and marks covered squares
            for i:=1 to 8 do
            begin
                if (x+N[i]&amp;gt;=1) and (y+M[i]&amp;gt;=1) and (x+N[i]&amp;lt;=dydis) and (y+M[i]&amp;lt;=dydis)
                and (L[x+N[i],y+M[i]]&amp;lt;&amp;gt;'Z') and (L[x+N[i],y+M[i]]&amp;lt;&amp;gt;'.') then
                begin
                L[x+N[i],y+M[i]]:='.';  Grizti[i]:=1;
                end;
            end;
        end;
    end;

//////////////////////////////////////////////////
/////////
    for x:=1 to dydis do
    begin
        for y:=1 to dydis do
        begin
        if (L[x,y]&amp;lt;&amp;gt;'Z') and (L[x,y]&amp;lt;&amp;gt;'.') then break;                          // finds not occupied square
        end;
    if (L[x,y]&amp;lt;&amp;gt;'Z') and (L[x,y]&amp;lt;&amp;gt;'.') then break;
    end;

    if zirgas&amp;lt;=zirgu_sk then
    begin
        for i:=1 to 8 do                                                         // recursion. calls procedure again and again
        begin
        Delioti(zirgas+1,x+N[i],y+M[i]);
        end;
    end;
//////////////////////////////////////////////////
/////////
    if (x&amp;lt;&amp;gt;1) and (y&amp;lt;&amp;gt;1) and (zirgas&amp;lt;&amp;gt;0) then
    begin
        if (x&amp;gt;=1) and (y&amp;gt;=1) and (x&amp;lt;=dydis) and (y&amp;lt;=dydis) then
        begin
        L[x,y]:='0';
            for i:=1 to 8 do
            begin
                if Grizti[i]=1 then
                begin                                                               // deletes knight, and his covered squares
                L[x+N[i],y+M[i]]:='0';
                end;
            end;
        end;
    end;
    for z:=1 to 8 do
    begin
    Grizti[z]:=0;
    end;
//////////////////////////////////////////////////
/////////
end;
//******************************//
begin
  N[1]:=1;  M[1]:=2;
  N[2]:=1;  M[2]:=-2;
  N[3]:=2;  M[3]:=-1;
  N[4]:=2;  M[4]:=1;
  N[5]:=-2; M[5]:=-1;
  N[6]:=-2; M[6]:=1;
  N[7]:=-1; M[7]:=-2;
  N[8]:=-1; M[8]:=2;
    for dydis:=1 to 8 do
    begin
    Grizti[dydis]:=0;
    end;
writeln('zirgu skaicius:');
readln(zirgu_sk);
writeln('lentos dydis:');
readln(dydis);
nulinimas(L,dydis);    // changes all squares value to '0'
Delioti(0,1,1);
readln;
end.
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431711/431711/recursion-backtracking-problem-knight-coverings/</guid>
      <pubDate>Tue, 26 Mar 2013 14:20:59 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>recursion (backtracking) problem, knight coverings</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431710/431710/recursion-backtracking-problem-knight-coverings/</link>
      <description>hello everyone,&lt;br /&gt;
i have problems with this program and i am praying for your help.&lt;br /&gt;
The task is to put given number of knights, on given size chess board, that every square of the board is covered. That is, every square on the board is either occupied by a knight or attacked by a knight. knights can attack each other. the solutions are givven here. &lt;a href="http://www.contestcen.com/knight.htm"&gt;&lt;/a&gt;&lt;br /&gt;
i am using recursion. algorithm:&lt;br /&gt;
1. choose not occupied square&lt;br /&gt;
2. try every knight, which can occupy that square&lt;br /&gt;
3. choose another square and so on, till knight max number is reached.&lt;br /&gt;
basicly, i try every posibble knight positions.&lt;br /&gt;
i wrote program, which is below, but it crashes when i put more than 6 knights, and show nonsense in boards below 6. i know that the problem is in backtracking, when i need to delete a knight. but i dont know how to correct it.&lt;br /&gt;
again, praying for your help. Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;program zirgai;
uses crt;
type lenta = array[1..8,1..8] of char;
     ejimai = array[1..8] of integer;
var L:lenta;
    N,M,Grizti:ejimai;
    zirgu_sk,dydis,r:integer;
//******************************//
procedure nulinimas(var L:lenta; d:integer);
var x,y:integer;
begin
for x:=1 to d do
    begin
    for y:=1 to d do
        begin
        L[x,y]:='0';
        end;
    end;
end;
//******************************//
procedure tikrinimas(L:lenta; d:integer; var r:integer);
var x,y:integer;
begin
r:=1;
for x:=1 to d do
    begin
    for y:=1 to d do
        begin
        if L[x,y]='0' then begin r:=0; break; end;
        end;
    if L[x,y]='0' then begin r:=0; break; end;
    end;
end;
//******************************//
procedure braizyti(L:lenta; d:integer);
var x1,x2,y1,y2,counter,x,y:integer;
begin
counter:=1;
y1:=1;
y2:=3;
    for x:=1 to d do                                          // draws a chess board
    begin
    x1:=1;
    x2:=5;
        for y:=1 to d do
        begin
        window(x1,y1,x2,y2);
        if (counter mod 2) = 0 then textbackground(red)
        else textbackground(green);
        clrscr;
        writeln;
        writeln('  ',L[x,y]);
        counter:=counter+1;
        x1:=x1+5;
        x2:=x2+5;
        end;
    y1:=y1+3;
    y2:=y2+3;
    if (d mod 2) = 0 then counter:=counter+1;
    end;
end;
//******************************//
procedure Delioti(zirgas,x,y:integer);
var i,z:integer;
begin
tikrinimas(L,dydis,r);
if r=1 then
begin
writeln('done');                    // checks if all sqaures are covered
braizyti(L,dydis);
readln;
exit;
end;
//////////////////////////////////////////////////
/////////
    if (x&amp;lt;&amp;gt;1) and (y&amp;lt;&amp;gt;1) and (zirgas&amp;lt;&amp;gt;0) then
    begin
        if (x&amp;gt;=1) and (y&amp;gt;=1) and (x&amp;lt;=dydis) and (y&amp;lt;=dydis) then
        begin
        L[x,y]:='Z';                                                                             // puts knight, and marks covered squares
            for i:=1 to 8 do
            begin
                if (x+N[i]&amp;gt;=1) and (y+M[i]&amp;gt;=1) and (x+N[i]&amp;lt;=dydis) and (y+M[i]&amp;lt;=dydis)
                and (L[x+N[i],y+M[i]]&amp;lt;&amp;gt;'Z') and (L[x+N[i],y+M[i]]&amp;lt;&amp;gt;'.') then
                begin
                L[x+N[i],y+M[i]]:='.';  Grizti[i]:=1;
                end;
            end;
        end;
    end;

//////////////////////////////////////////////////
/////////
    for x:=1 to dydis do
    begin
        for y:=1 to dydis do
        begin
        if (L[x,y]&amp;lt;&amp;gt;'Z') and (L[x,y]&amp;lt;&amp;gt;'.') then break;                          // finds not occupied square
        end;
    if (L[x,y]&amp;lt;&amp;gt;'Z') and (L[x,y]&amp;lt;&amp;gt;'.') then break;
    end;

    if zirgas&amp;lt;=zirgu_sk then
    begin
        for i:=1 to 8 do                                                         // recursion. calls procedure again and again
        begin
        Delioti(zirgas+1,x+N[i],y+M[i]);
        end;
    end;
//////////////////////////////////////////////////
/////////
    if (x&amp;lt;&amp;gt;1) and (y&amp;lt;&amp;gt;1) and (zirgas&amp;lt;&amp;gt;0) then
    begin
        if (x&amp;gt;=1) and (y&amp;gt;=1) and (x&amp;lt;=dydis) and (y&amp;lt;=dydis) then
        begin
        L[x,y]:='0';
            for i:=1 to 8 do
            begin
                if Grizti[i]=1 then
                begin                                                               // deletes knight, and his covered squares
                L[x+N[i],y+M[i]]:='0';
                end;
            end;
        end;
    end;
    for z:=1 to 8 do
    begin
    Grizti[z]:=0;
    end;
//////////////////////////////////////////////////
/////////
end;
//******************************//
begin
  N[1]:=1;  M[1]:=2;
  N[2]:=1;  M[2]:=-2;
  N[3]:=2;  M[3]:=-1;
  N[4]:=2;  M[4]:=1;
  N[5]:=-2; M[5]:=-1;
  N[6]:=-2; M[6]:=1;
  N[7]:=-1; M[7]:=-2;
  N[8]:=-1; M[8]:=2;
    for dydis:=1 to 8 do
    begin
    Grizti[dydis]:=0;
    end;
writeln('zirgu skaicius:');
readln(zirgu_sk);
writeln('lentos dydis:');
readln(dydis);
nulinimas(L,dydis);    // changes all squares value to '0'
Delioti(0,1,1);
readln;
end.
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431710/431710/recursion-backtracking-problem-knight-coverings/</guid>
      <pubDate>Tue, 26 Mar 2013 14:14:27 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Pascal compile problem</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431678/431678/pascal-compile-problem/</link>
      <description>Good morning to everyone. I've been searching for two days, and I cannot find a solution for my problem. When I write a program in pascal turbo, I click run and it works perfectly, but when I try to open up the file in an executable (.exe) extension I can't and the computer gives me this error "The version of this file is incompatible with the version of Windows you are using(...)" , I've already changed the properties for every windows( xp, 95, vista etc...) and it doesn't work anyway. Any solution?. I've uploaded the file, please check if it works in your system(https://mega.co.nz/#!CkognDxS!GTywNkA-bmlM5HZfTb5IN25U2xdS9MggL12qSjN4Dig), I didn't upload it here since they do not accept .exe files. Thank you for reading this and for your time. (I'm using windows 7).&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431678/431678/pascal-compile-problem/</guid>
      <pubDate>Sun, 24 Mar 2013 03:56:32 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Pascal compile problem</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431676/431676/pascal-compile-problem/</link>
      <description>Good morning to everyone. I've been searching for two days, and I cannot find a solution for my problem. When I write a program in pascal turbo, I click run and it works perfectly, but when I try to open up the file in an executable (.exe) extension I can't and the computer gives me this error "The version of this file is incompatible with the version of Windows you are using(...)" , I've already changed the properties for every windows( xp, 95, vista etc...) and it doesn't work anyway. Any solution?. I've uploaded the file, please check if it works in your system(https://mega.co.nz/#!CkognDxS!GTywNkA-bmlM5HZfTb5IN25U2xdS9MggL12qSjN4Dig), I didn't upload it here since they do not accept .exe files. Thank you for reading this and for your time. (I'm using windows 7).&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431676/431676/pascal-compile-problem/</guid>
      <pubDate>Sun, 24 Mar 2013 03:53:16 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Got problem making program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431669/431669/got-problem-making-program/</link>
      <description>Hi, &lt;br /&gt;
&lt;br /&gt;
I am trying to create the program for like&lt;br /&gt;
&lt;br /&gt;
if c button pressed it changes the random color&lt;br /&gt;
&lt;br /&gt;
and when spacebar pressed it changes to filled circle&lt;br /&gt;
&lt;br /&gt;
they give me the instructions &lt;br /&gt;
&lt;br /&gt;
i m trying to follow that &lt;br /&gt;
&lt;br /&gt;
but i m getting error that command not found &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2585"&gt;New folder.zip&lt;/a&gt; (27065 bytes | downloaded 27 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431669/431669/got-problem-making-program/</guid>
      <pubDate>Sat, 23 Mar 2013 05:46:25 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Got problem making program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431668/431668/got-problem-making-program/</link>
      <description>Hi, &lt;br /&gt;
&lt;br /&gt;
I am trying to create the program for like&lt;br /&gt;
&lt;br /&gt;
if c button pressed it changes the random color&lt;br /&gt;
&lt;br /&gt;
and when spacebar pressed it changes to filled circle&lt;br /&gt;
&lt;br /&gt;
they give me the instructions &lt;br /&gt;
&lt;br /&gt;
i m trying to follow that &lt;br /&gt;
&lt;br /&gt;
but i m getting error that command not found &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2584"&gt;New folder.zip&lt;/a&gt; (27065 bytes | downloaded 26 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431668/431668/got-problem-making-program/</guid>
      <pubDate>Sat, 23 Mar 2013 05:44:02 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Much Simpler Roman Numeral decoder, and correct</title>
      <link>http://www.programmersheaven.com/mb/pasprog/384120/431607/much-simpler-roman-numeral-decoder-and-correct/#431607</link>
      <description>Some of the code used here forgets the exceptions for 900, 90, 40 and 4, you're supposed to use the shortest string which is legal, and you can subtract a value by including up to one value from the next value below. This is why 90 is XC, not LXXXX, but 999 is CMXCIX and not IM because it goes up more than one value (V and X follow I).&lt;br /&gt;
&lt;br /&gt;
function Roman(x:integer):string;&lt;br /&gt;
{ Paul Robinson, Viridian Development Corporation, 2013-03-18 &lt;br /&gt;
&lt;br /&gt;
  if your compiler doesn't include 'result' as a standard&lt;br /&gt;
  variable for the return value of a function, uncomment&lt;br /&gt;
  the next line }&lt;br /&gt;
{ var result: string }&lt;br /&gt;
begin&lt;br /&gt;
    result := '';&lt;br /&gt;
    while x &amp;gt;= 1000 do&lt;br /&gt;
         begin result := result+'m';  x := x - 1000 end;&lt;br /&gt;
      if x &amp;gt;= 900 then&lt;br /&gt;
         begin result := result+'cm'; x := x - 900 end;&lt;br /&gt;
      if x &amp;gt;= 500 then&lt;br /&gt;
         begin result := result+'d';  x := x - 500 end;&lt;br /&gt;
      if x &amp;gt;= 400 then&lt;br /&gt;
         begin result := result+'cd'; x := x - 400 end;&lt;br /&gt;
      while x &amp;gt;= 100 do&lt;br /&gt;
         begin result := result+'c';  x := x - 100 end;&lt;br /&gt;
      if x &amp;gt;= 90 then&lt;br /&gt;
         begin result := result+'xc'; x := x - 90 end;&lt;br /&gt;
      if x &amp;gt;= 50 then&lt;br /&gt;
         begin result := result+'l';  x := x - 50 end;&lt;br /&gt;
      if x &amp;gt;= 40 then&lt;br /&gt;
         begin result := result+'xl'; x := x - 40 end;&lt;br /&gt;
      while x &amp;gt;= 10 do&lt;br /&gt;
         begin result := result+'x';  x := x - 10 end;&lt;br /&gt;
      if x &amp;gt;= 9 then&lt;br /&gt;
         begin result := result+'ix'; x := x - 9 end;&lt;br /&gt;
      if x &amp;gt;= 5 then&lt;br /&gt;
         begin result := result+'v';  x := x - 5 end;&lt;br /&gt;
      if x &amp;gt;= 4 then&lt;br /&gt;
         begin result := result+'iv'; x := x - 5 end;&lt;br /&gt;
      while x &amp;gt;= 1 do&lt;br /&gt;
         begin result := result+'i';  x := x - 1 end;&lt;br /&gt;
{if result is not in your compiler for a return value &lt;br /&gt;
 uncomment the following line }&lt;br /&gt;
{  roman := result;}&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/384120/431607/much-simpler-roman-numeral-decoder-and-correct/#431607</guid>
      <pubDate>Mon, 18 Mar 2013 04:28:51 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: Pascal programming help</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431566/431568/re-pascal-programming-help/#431568</link>
      <description>Post your whole code not just screenshots, we'll may be able to point you in the right direction.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431566/431568/re-pascal-programming-help/#431568</guid>
      <pubDate>Wed, 13 Mar 2013 21:53:57 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Pascal programming help</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431567/431567/pascal-programming-help/</link>
      <description>Hi guys! I'm sure this is the wrong place since it's Pascal but I need immediate help. &lt;br /&gt;
I'm supposed to write this program while will accept an unknown number of names of candidates and the total votes that person has recieved. It's a program to do with elections. It basically has to find the Highest number among the numbers inputted and print "The winner is .....!" &lt;br /&gt;
I'm not sure I've written my program the correct way, but I keep getting this error. I would appreciate it if anyone could after this for me please.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://i45.tinypic.com/5aes5z.png" /&gt;&lt;br /&gt;
&lt;br /&gt;
And this is the error I get.&lt;br /&gt;
&lt;img src="http://i46.tinypic.com/dmg20p.png" /&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431567/431567/pascal-programming-help/</guid>
      <pubDate>Wed, 13 Mar 2013 17:32:55 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Pascal programming help</title>
      <link>http://www.programmersheaven.com/mb/pasprog/431566/431566/pascal-programming-help/</link>
      <description>Hi guys! I'm sure this is the wrong place since it's Pascal but I need immediate help. &lt;br /&gt;
I'm supposed to write this program while will accept an unknown number of names of candidates and the total votes that person has recieved. It's a program to do with elections. It basically has to find the Highest number among the numbers inputted and print "The winner is .....!" &lt;br /&gt;
I'm not sure I've written my program the correct way, but I keep getting this error. I would appreciate it if anyone could after this for me please.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://i45.tinypic.com/5aes5z.png" /&gt;&lt;br /&gt;
&lt;br /&gt;
And this is the error I get.&lt;br /&gt;
&lt;img src="http://i46.tinypic.com/dmg20p.png" /&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/431566/431566/pascal-programming-help/</guid>
      <pubDate>Wed, 13 Mar 2013 17:31:04 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: array and diagonal</title>
      <link>http://www.programmersheaven.com/mb/pasprog/184031/431554/re-array-and-diagonal/#431554</link>
      <description>PLEASE HELP if there is something that you dont understand my email Covergirl.Daina@gmail.com&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2562"&gt;Diogonal matrix 10.rar&lt;/a&gt; (10979 bytes | downloaded 25 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/184031/431554/re-array-and-diagonal/#431554</guid>
      <pubDate>Tue, 12 Mar 2013 16:03:30 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: array and diagonal</title>
      <link>http://www.programmersheaven.com/mb/pasprog/184031/431553/re-array-and-diagonal/#431553</link>
      <description>Please help&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2561"&gt;Diogonal matrix 10.rar&lt;/a&gt; (10979 bytes | downloaded 29 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/184031/431553/re-array-and-diagonal/#431553</guid>
      <pubDate>Tue, 12 Mar 2013 16:00:59 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: array and diagonal</title>
      <link>http://www.programmersheaven.com/mb/pasprog/184031/431552/re-array-and-diagonal/#431552</link>
      <description>Please help&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2561"&gt;Diogonal matrix 10.rar&lt;/a&gt; (10979 bytes | downloaded 29 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/184031/431552/re-array-and-diagonal/#431552</guid>
      <pubDate>Tue, 12 Mar 2013 15:59:08 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>