<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Pascal Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/Tag/1690/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to Pascal.</description>
    <language>en</language>
    <copyright>Copyright 2009 Programmers Heaven</copyright>
    <pubDate>Fri, 20 Nov 2009 19:59:36 -0700</pubDate>
    <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>
    <item>
      <title>FAT12/FAT16 support.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/408780/408780/ReadMessage.aspx#408780</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/lordestabia/"&gt;lordestabia&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/408780/408780/ReadMessage.aspx#408780"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;I need to implement FAT12/FAT16 support in a project. Where an I get the specifications for it? Or is there any existing source code I can use for reference.&lt;br /&gt;
&lt;br /&gt;
Thank you in advance.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/408780/408780/ReadMessage.aspx#408780</guid>
      <pubDate>Tue, 03 Nov 2009 14:52:33 -0700</pubDate>
    </item>
    <item>
      <title>Re: im getting an error when using program.. compiles fine!</title>
      <link>http://www.programmersheaven.com/mb/pasprog/399536/399546/ReadMessage.aspx#399546</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/anthrax11/"&gt;anthrax11&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/399536/399546/ReadMessage.aspx#399546"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;With such equations you need to make some checks first. Check that a isn't 0, because you can't divide by 0. Also check that b*b-4ac isn't negative, because you can't root a negative number. If the conditions aren't met, then there are no solutions and the program should handle that.&lt;br /&gt;
&lt;br /&gt;
Usually the best thing to do in these situations is to debug the program.&lt;br /&gt;
&lt;br /&gt;
And the quadratic formula should be:&lt;br /&gt;
x:=(-b+sqrt((b*b)-(4*a*c)))/2*a;&lt;br /&gt;
instead of:&lt;br /&gt;
x:=-b+sqrt(((b*b)-(4*a*c))/2*a);</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/399536/399546/ReadMessage.aspx#399546</guid>
      <pubDate>Wed, 23 Sep 2009 07:05:21 -0700</pubDate>
    </item>
    <item>
      <title>Re: Exit the program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/397311/399093/ReadMessage.aspx#399093</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/397311/399093/ReadMessage.aspx#399093"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;EXIT will leave a procedure/function, HALT will leave the program.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/397311/399093/ReadMessage.aspx#399093</guid>
      <pubDate>Mon, 21 Sep 2009 20:57:09 -0700</pubDate>
    </item>
    <item>
      <title>Re: Solved?</title>
      <link>http://www.programmersheaven.com/mb/pasprog/359838/396596/ReadMessage.aspx#396596</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Laaca/"&gt;Laaca&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/359838/396596/ReadMessage.aspx#396596"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;SOLVED!&lt;br /&gt;
Try this source:&lt;br /&gt;
&lt;br /&gt;
uses Graph,Crt;&lt;br /&gt;
&lt;br /&gt;
type TBod = object&lt;br /&gt;
     x,y:real;&lt;br /&gt;
     end;&lt;br /&gt;
&lt;br /&gt;
     Tkruh = object(TBod)&lt;br /&gt;
     r:real;&lt;br /&gt;
     end;&lt;br /&gt;
&lt;br /&gt;
const delta=0.0000001;&lt;br /&gt;
      max_bod = 6;&lt;br /&gt;
&lt;br /&gt;
{     specbody:array[0..max_bod] of TBod = ((x:408;y:313),&lt;br /&gt;
                                            (x:406;y:215),&lt;br /&gt;
                                            (x:311;y:151),&lt;br /&gt;
                                            (x:225;y:309),&lt;br /&gt;
                                            (x:330;y:245));}&lt;br /&gt;
&lt;br /&gt;
var barva:byte;&lt;br /&gt;
    body:array[0..max_bod] of TBod;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function IsEqual(a,b:real):boolean;&lt;br /&gt;
begin&lt;br /&gt;
IsEqual:=(a&amp;lt;b+delta) and (a&amp;gt;b-delta);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
Function IsLessOrEqual(a,b:real):boolean;&lt;br /&gt;
begin&lt;br /&gt;
IsLessOrEqual:=(a&amp;lt;b) or IsEqual(a,b);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function Vzdalenost(a1,a2:Tbod):real;&lt;br /&gt;
{Vrati vzdalenost mezi dvema body}&lt;br /&gt;
var n1,n2:real;&lt;br /&gt;
begin&lt;br /&gt;
n1:=sqr(a1.x-a2.x);&lt;br /&gt;
n2:=sqr(a1.y-a2.y);&lt;br /&gt;
Vzdalenost:=sqrt(n1+n2);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
procedure Kruznice3(a1,a2,a3:Tbod;var t:Tkruh);&lt;br /&gt;
{Sestroji kruznici ze 3 bodu. Pokus jsou v primce (netvori trojuhelnik), tak}&lt;br /&gt;
{ji sestroji ze dvou krajnich bodu usecky}&lt;br /&gt;
var a,b,c,d,e,f,g:real;&lt;br /&gt;
begin&lt;br /&gt;
  a:=a2.x - a1.x;&lt;br /&gt;
  b:=a2.y - a1.y;&lt;br /&gt;
  c:=a3.x - a1.x;&lt;br /&gt;
  d:=a3.y - a1.y;&lt;br /&gt;
  e:=A * (a1.x + a2.x) + B * (a1.y + a2.y);&lt;br /&gt;
  f:=C * (a1.x + a3.x) + D * (a1.y + a3.y);&lt;br /&gt;
  g:=2.0 * (A * (a3.y - a2.y) - B * (a3.x - a2.x));&lt;br /&gt;
  if IsEqual(g,0) then  {lepsi nez if G=0}&lt;br /&gt;
     begin&lt;br /&gt;
     a:=Vzdalenost(a1,a2);&lt;br /&gt;
     b:=Vzdalenost(a1,a3);&lt;br /&gt;
     c:=Vzdalenost(a2,a3); {udelame, aby A bylo nejvetsi}&lt;br /&gt;
     if (a&amp;gt;b) then&lt;br /&gt;
        if (a&amp;gt;c) then begin d:=a;end else&lt;br /&gt;
                      begin d:=c;a1:=a2;a2:=a3;end else&lt;br /&gt;
     {b&amp;gt;=a}&lt;br /&gt;
        if (b&amp;gt;c) then begin d:=b;a2:=a3;end else&lt;br /&gt;
                      begin d:=c;a1:=a2;a2:=a3;end;&lt;br /&gt;
&lt;br /&gt;
     t.x:=(a1.x+a2.x) / 2;&lt;br /&gt;
     t.y:=(a1.y+a2.y) / 2;&lt;br /&gt;
     t.r:=d / 2;&lt;br /&gt;
     Exit;&lt;br /&gt;
     end;&lt;br /&gt;
  t.x := (D * E - B * F) / G;&lt;br /&gt;
  t.y := (A * F - C * E) / G;&lt;br /&gt;
  t.r := Vzdalenost(a1,t);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function MaxDistance(var a,b:longint):real;&lt;br /&gt;
{vrati maximalni vzdalenost mezi body v poli}&lt;br /&gt;
var i,j:longint;&lt;br /&gt;
    k,max:real;&lt;br /&gt;
begin&lt;br /&gt;
max:=0;&lt;br /&gt;
for i:=0 to max_bod-1 do&lt;br /&gt;
    for j:=i+1 to max_bod do&lt;br /&gt;
        begin&lt;br /&gt;
        k:=Vzdalenost(body[i],body[j]); {zmerim vzdalenost vsech bodu}&lt;br /&gt;
        if k&amp;gt;max then&lt;br /&gt;
           begin&lt;br /&gt;
           max:=k;&lt;br /&gt;
           a:=i;&lt;br /&gt;
           b:=j;&lt;br /&gt;
           end;&lt;br /&gt;
        end;&lt;br /&gt;
MaxDistance:=max;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function MaxDistanceToPoint(p:Tbod):real;&lt;br /&gt;
{maximalni vzdalenost bodu v poli vhledem k P}&lt;br /&gt;
var v,w:real;&lt;br /&gt;
    i:longint;&lt;br /&gt;
begin&lt;br /&gt;
w:=0;&lt;br /&gt;
for i:=0 to max_bod do&lt;br /&gt;
    begin&lt;br /&gt;
    v:=Vzdalenost(p,body[i]);&lt;br /&gt;
    if v&amp;gt;w then w:=v;&lt;br /&gt;
    end;&lt;br /&gt;
MaxDistanceToPoint:=w;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
Procedure ZjistiObklopujiciKruznici(var z:Tkruh);&lt;br /&gt;
{sestroji nejmensi obklopujici kruznici}&lt;br /&gt;
var s:tbod;&lt;br /&gt;
    a,b,c:longint;&lt;br /&gt;
    v,w:real;&lt;br /&gt;
    h:TKruh;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
v:=MaxDistance(a,b);             {zjisti nejdelsi vzdalenost mezi body a take}&lt;br /&gt;
                                 {o ktere body jde}&lt;br /&gt;
s.x:=(body[a].x+body&lt;strong&gt;.x) / 2;&lt;br /&gt;
s.y:=(body[a].y+body&lt;strong&gt;.y) / 2;  {na teto usecce udela stred S}&lt;br /&gt;
&lt;br /&gt;
w:=MaxDistanceToPoint(s);&lt;br /&gt;
{a zjisti, jestli je nejaky bod dal od S nez krajni body usecky}&lt;br /&gt;
&lt;br /&gt;
if IsLessOrEqual(w,v/2) then&lt;br /&gt;
{kdyz ne, tak vime, ze je kruznice tvorena dvema body}&lt;br /&gt;
   begin&lt;br /&gt;
   barva:=5;&lt;br /&gt;
   z.x:=s.x;&lt;br /&gt;
   z.y:=s.y;&lt;br /&gt;
   z.r:=v/2;&lt;br /&gt;
   end&lt;br /&gt;
   else begin&lt;br /&gt;
   {existuje bod, ktery je dal od S nez krajni body usecky.&lt;br /&gt;
   {V tom pripade bude kruznice definovana tremi body, pricemz ale mezi nimi&lt;br /&gt;
    nemusi nutne byt body A a B. Je tedy treba proscanovat vsechny myslitelne&lt;br /&gt;
    trojuhelniky, ktere je mozno z definovanych bodu sestavit a hledat jim&lt;br /&gt;
    opsane kruznice}&lt;br /&gt;
   z.r:=0;&lt;br /&gt;
   for a:=0 to max_bod-2 do&lt;br /&gt;
       for b:=a+1 to max_bod-1 do&lt;br /&gt;
           for c:=b+1 to max_bod do&lt;br /&gt;
               begin&lt;br /&gt;
               {tento trojnasobny cyklus proscanuje vsechny myslitelne trojuhelniky}&lt;br /&gt;
               Kruznice3(body[a],body&lt;strong&gt;,body[c],h);&lt;br /&gt;
               s.x:=h.x;&lt;br /&gt;
               s.y:=h.y;&lt;br /&gt;
&lt;br /&gt;
               w:=MaxDistanceToPoint(s);&lt;br /&gt;
               if IsLessOrEqual(w,h.r) then&lt;br /&gt;
                   if (z.r=0) or (h.r&amp;lt;z.r) then z:=h;&lt;br /&gt;
               end;&lt;br /&gt;
   end;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Procedure NakresliScenu(z:TKruh);&lt;br /&gt;
var a:byte;&lt;br /&gt;
begin&lt;br /&gt;
SetColor(4);&lt;br /&gt;
Circle(round(z.x),round(z.y),round(z.r));&lt;br /&gt;
for a:=0 to max_bod do&lt;br /&gt;
    PutPixel(round(body[a].x),round(body[a].y),14);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{-----------------------------------------------------------------}&lt;br /&gt;
&lt;br /&gt;
var gd,gm:integer;&lt;br /&gt;
    z:Tkruh;&lt;br /&gt;
    a:longint;&lt;br /&gt;
    r1,r2:real;&lt;br /&gt;
    c:char;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
randomize;&lt;br /&gt;
gd:=vga;gm:=vgahi;InitGraph(gd,gm,'');&lt;br /&gt;
OutText('Pro ukonceni zmackni ESC, pro dalsi sestavu jakoukoliv jinou klavesu');&lt;br /&gt;
SetFillStyle(0,0);&lt;br /&gt;
&lt;br /&gt;
repeat&lt;br /&gt;
Bar(0,20,639,479);&lt;br /&gt;
for a:=0 to max_bod do&lt;br /&gt;
    begin&lt;br /&gt;
    r1:=random(200);&lt;br /&gt;
    r2:=random(200);&lt;br /&gt;
    body[a].x:=r1-100+320;&lt;br /&gt;
    body[a].y:=r2-100+240;&lt;br /&gt;
    end;&lt;br /&gt;
&lt;br /&gt;
ZjistiObklopujiciKruznici(z);&lt;br /&gt;
NakresliScenu(z);&lt;br /&gt;
&lt;br /&gt;
repeat until keypressed;&lt;br /&gt;
c:=readkey;&lt;br /&gt;
while keypressed do readkey;&lt;br /&gt;
&lt;br /&gt;
until c=#27;&lt;br /&gt;
CloseGraph;&lt;br /&gt;
end.&lt;br /&gt;
&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/359838/396596/ReadMessage.aspx#396596</guid>
      <pubDate>Sat, 05 Sep 2009 14:29:45 -0700</pubDate>
    </item>
    <item>
      <title>Re: would error occurs?</title>
      <link>http://www.programmersheaven.com/mb/pasprog/395453/395610/ReadMessage.aspx#395610</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/395453/395610/ReadMessage.aspx#395610"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;The code should run, but after a while it will run out of memory.&lt;br /&gt;
&lt;br /&gt;
Basically, here's what is happening. When you call a procedure, Pascal stores information so that you still have the information when you leave the procedure.&lt;br /&gt;
&lt;br /&gt;
In this case, when BOOK calls MENU, the computer stores info.&lt;br /&gt;
When MENU calls STORE, it stores more info.&lt;br /&gt;
When STORE calls MENU, it stores more info.&lt;br /&gt;
&lt;br /&gt;
Now if you keep calling these two procedures back and forth, it keeps storing info until you run out of memory.&lt;br /&gt;
&lt;br /&gt;
If you look at procedures like a list, after pushing '1' 5 times, it would be:&lt;br /&gt;
&lt;br /&gt;
BOOK -&amp;gt; MENU -&amp;gt; STORE -&amp;gt; MENU -&amp;gt; STORE -&amp;gt; MENU -&amp;gt; STORE&lt;br /&gt;
&lt;br /&gt;
This could just keep growing.&lt;br /&gt;
When a procedure ends, it goes back to the point in the code that it was called.&lt;br /&gt;
&lt;br /&gt;
So if we change STORE to this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
procedure store;
var store_choice : integer;
begin
     repeat
           readln(store_choice);
     until (store_choice = 1);
end;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Then after pushing '1' 5 times, the list would look like:&lt;br /&gt;
&lt;br /&gt;
BOOK -&amp;gt; MENU -&amp;gt; STORE&lt;br /&gt;
&lt;br /&gt;
If you are still confused, look at this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
01: procedure menu;
02: var choice : integer;
03: begin
04:       readln(choice);
05:       If choice = 1 then
06:          store
07: end;
08:
09: procedure store;
10: var store_choice : integer;
11: begin
12:     repeat
13:           readln(store_choice);
14:     until (store_choice = 1);
15: end;
16:
17: program book;
18: begin
19:      menu
20: end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Using the line #s above, if we run your program this is how it would execute:&lt;br /&gt;
&lt;span style="color: Green;"&gt;18,19,&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;03,04&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Red;"&gt;PUSH '1'&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;05,06&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;11,12,13&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Red;"&gt;PUSH '2'&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;14,12,13&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Red;"&gt;PUSH '1'&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;14,15&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;7&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: Green;"&gt;20&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you follow the above line numbers you will see how it works. If you want to allow more than one visit to the STORE, you can put a loop in the MENU procedure as well.&lt;br /&gt;
&lt;br /&gt;
Hope this clears things up a bit.&lt;br /&gt;
&lt;br /&gt;
EDIT: Of course, looking at this again, I doubt that your error has to do with Out of Memory as each section of information that is stored is only around 10-20 bytes, so even if you only have 1MB of memory in your computer, it would still take you about 500,000 presses of '1' to run out of memory.&lt;br /&gt;
If this is the case, you need to start pressing a different key ;)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/395453/395610/ReadMessage.aspx#395610</guid>
      <pubDate>Sun, 23 Aug 2009 15:42:02 -0700</pubDate>
    </item>
    <item>
      <title>Re: Turbo Pascal Printing on USB</title>
      <link>http://www.programmersheaven.com/mb/pasprog/395191/395263/ReadMessage.aspx#395263</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/395191/395263/ReadMessage.aspx#395263"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;I don't tink so. Iou would probably have a better chance finding a program that emulates the USB printer port on the LPT1 port.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/395191/395263/ReadMessage.aspx#395263</guid>
      <pubDate>Mon, 17 Aug 2009 19:29:57 -0700</pubDate>
    </item>
    <item>
      <title>Re: Random Lotto</title>
      <link>http://www.programmersheaven.com/mb/pasprog/395155/395262/ReadMessage.aspx#395262</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/395155/395262/ReadMessage.aspx#395262"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;This would be the same idea as the post I just replied to:&lt;br /&gt;
&lt;a href="http://www.programmersheaven.com/mb/pasprog/394632/394663/re-help-with-random-please/?S=B20000#394663"&gt;http://www.programmersheaven.com/mb/pasprog/394632/394663/re-help-with-random-please/?S=B20000#394663&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Just have a section that lets ou manually enter the numbers and then use this to mix them up.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/395155/395262/ReadMessage.aspx#395262</guid>
      <pubDate>Mon, 17 Aug 2009 19:27:51 -0700</pubDate>
    </item>
    <item>
      <title>Re: Pascal language users</title>
      <link>http://www.programmersheaven.com/mb/pasprog/393913/395174/ReadMessage.aspx#395174</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/393913/395174/ReadMessage.aspx#395174"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;:&lt;br /&gt;
: Pascal can't make programs with normal window&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
Neither can C or C++, you have to use Visual C or Visual C++.&lt;br /&gt;
&lt;br /&gt;
Delphi is Visual Pascal.  Apparently Borland could not call it Visual Pascal due to trademark restrictions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/393913/395174/ReadMessage.aspx#395174</guid>
      <pubDate>Sun, 16 Aug 2009 00:28:31 -0700</pubDate>
    </item>
    <item>
      <title>Re: Help with random please</title>
      <link>http://www.programmersheaven.com/mb/pasprog/394632/394663/ReadMessage.aspx#394663</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/394632/394663/ReadMessage.aspx#394663"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;pre class="sourcecode"&gt;
VAR
   numArray : Array[1..20] Of Byte;
   i,
   y1,
   y2,
   temp  : Byte;

Begin
     { Fill an array in order }
     For i := 1 to 20 do
         numArray[i] := x;

     { I chose 50 passes of mixing, but you can do more or less }
     For i := 1 to 50 do
     Begin
          { Set both array pointers to a random location in the array }
          y1 := Random(20) + 1;
          y2 := Random(20) + 1;
          { Swap the two positions }
          temp := numArray[y1];
          numArray[y1] := numArray[y2];
          numArray[y2] := temp;
     End;
End.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
You will now have an array of 1..20 in random order and each number only exists once. You can then use this to access your questions.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
MyBlock.Add( TBlock.create( 265,320, fRoundImageIndex[numArray[1]], DXSpriteEngine.Engine, dxImageList));
MyBlock.Add( TBlock.create(   7, 10, fRoundImageIndex[numArray[2]], DXSpriteEngine.Engine,dxImageList));
MyBlock.Add( TBlock.create( 135, 30, fRoundImageIndex[numArray[3]], DXSpriteEngine.Engine,dxImageList));
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Also, I would recommend storing all this into a record or class as well, then you can do as many blocks as ou want without writing more lines. Also, you could then have the block positions loaded from a file or whatever later if you wished.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
TYPE
   blockInfo = record
     x,
     y        : Word;
     quesNum  : Byte;
   End;

CONST
   { The total number of desired blocks }
   totalBlocks = 20;

   { All the 'x' positions of the blocks }
   startX : Array[1..20] Of Word =
       (265, 265, 265,   7, 135, 135,   7, 395, 395, 525, 
        525,  32,  32, 160, 160, 420, 420, 550, 550, 265)

   { All the 'y' positions of the blocks }
   startY : Array[1..20] Of Word =
       ( 80, 200, 320,  10,  30, 400, 430,  30, 400, 430, 
         10, 290, 150, 153, 276, 276, 153, 290, 150, 432)

VAR
   blocks : Array[1..totalBlocks] Of blockInfo;
   i,
   y1,
   y2,
   temp  : Byte;

Begin
     { Fill our blocks info in }
     For i := 1 to totalBlocks do
     Begin
         blocks[i].quesNum := i;
         blocks[i].x := startX[i];
         blocks[i].y := startY[i];
     End;

     { I chose 50 passes of mixing, but you can do more or less }
     For i := 1 to 50 do
     Begin
          { Set both array pointers to a random location in the array }
          y1 := Random(totalBlocks) + 1;
          y2 := Random(totalBlocks) + 1;
          { Swap the two positions }
          temp := blocks[y1].quesNum;
          blocks[y1].quesNum := blocks[y2].quesNum;
          blocks[y2].quesNum := temp;
     End;

     {...}

     For i := 1 to 20 do
       MyBlock.Add(TBlock.create( blocks[i].x, blocks[i].y,
                                  fRoundImageIndex[blocks[i].quesNum],
                                  DXSpriteEngine.Engine,dxImageList));
End.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This is just to show you, but the first two sections should really be in a seperate procedure, such as StartUp(); or such.&lt;br /&gt;
&lt;br /&gt;
Anyways, hope this gets you what you need!</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/394632/394663/ReadMessage.aspx#394663</guid>
      <pubDate>Tue, 04 Aug 2009 10:14:26 -0700</pubDate>
    </item>
    <item>
      <title>Re: Graphics and Images in 32bit platforms problem</title>
      <link>http://www.programmersheaven.com/mb/pasprog/394062/394073/ReadMessage.aspx#394073</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/394062/394073/ReadMessage.aspx#394073"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Through DOS? Resolutions that high have terrible refresh rates. I used to play with high res graphics alot in Pascal and never figures out how to adjust refresh rates, but if you are determined, then you will want to use VESA modes.&lt;br /&gt;
&lt;br /&gt;
For 800x600x32bit, you need to set mode 012Eh or $12E or 0x12E, however you prefer to write hex.&lt;br /&gt;
&lt;br /&gt;
Anyways, to set the VESA mode:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
ASM
   Mov Ax, $4F02
   Mov Bx, $12E
   Int $10
END;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Check here for more info:&lt;br /&gt;
&lt;a href="http://en.wikipedia.org/wiki/VESA_BIOS_Extensions"&gt;http://en.wikipedia.org/wiki/VESA_BIOS_Extensions&lt;/a&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/394062/394073/ReadMessage.aspx#394073</guid>
      <pubDate>Thu, 23 Jul 2009 01:07:32 -0700</pubDate>
    </item>
    <item>
      <title>Re: In search for a function !</title>
      <link>http://www.programmersheaven.com/mb/pasprog/393707/393899/ReadMessage.aspx#393899</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/393707/393899/ReadMessage.aspx#393899"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Are you using Windows or Dos?&lt;br /&gt;
&lt;br /&gt;
If DOS, you can access the screen directly:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
FUNCTION GetChar(X, Y : Word) : Char;
CONST
    TextScreen = $B800;
Begin
     GetChar := Chr(Mem[TextScreen: Y*160 + X*2]);
     { GetChar := Chr(Mem[TextScreen: Y*160 + X*2+1]); }
End;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
It's been a while, but I think it's the first line and the second is for the color of the character on the screen. If You keep getting the same value, try the second line instead.&lt;br /&gt;
&lt;br /&gt;
*EXTRA INFO* Each character on the screen is defined as two bytes. One is the actual character, then second is the color. The top four bits is the background color, the lower four bits it the forecolor, so $1F would be bgColor(1) and forColor(15), so White text on a Blue background.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/393707/393899/ReadMessage.aspx#393899</guid>
      <pubDate>Sun, 19 Jul 2009 17:49:39 -0700</pubDate>
    </item>
    <item>
      <title>2d mattrix / framebuffer</title>
      <link>http://www.programmersheaven.com/mb/pasprog/393625/393625/ReadMessage.aspx#393625</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Malekovits/"&gt;Malekovits&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/393625/393625/ReadMessage.aspx#393625"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Hi all!&lt;br /&gt;
&lt;br /&gt;
I am currently making my own 3d graphics engine (still only 2d) and for that i use borland pascal, compile in protected mode and use dosbox to run. (the only method in pascal that u can use delay function (only in protected mode) and the graph unit). I know, very stupid to program in pascal, but I am just for start developing the logic behind:&lt;br /&gt;
&lt;br /&gt;
I want to know what to use that can enable to me a 2d matrix to " turn on/off " pixels (and for that task to use the gpu, i mean only to turn the pixels on/off)&lt;br /&gt;
&lt;br /&gt;
I use the graph unit but it's horribly slow. What about gdi? Can I use directdraw (not directx)? &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/393625/393625/ReadMessage.aspx#393625</guid>
      <pubDate>Sun, 12 Jul 2009 11:46:11 -0700</pubDate>
    </item>
    <item>
      <title>Re: Needing help with nested conditions</title>
      <link>http://www.programmersheaven.com/mb/pasprog/393536/393573/ReadMessage.aspx#393573</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/393536/393573/ReadMessage.aspx#393573"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;strong&gt;else&lt;/strong&gt; cannot be preceded by a semicolon, but there's more wrong with your code than that.  Unless grouped together by &lt;strong&gt;begin/end&lt;/strong&gt;, an &lt;strong&gt;if&lt;/strong&gt; acts on only a single statement.  I have not studied your code in detail but I think this is what you want.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program mayorymenor;

var
   num1  : integer;
   num2  : integer;
   num3  : integer;
   mayor : integer;
   menor : integer;

begin
   write ('introduzca el primer número');
   readln (num1);
   write ('introduzca el segundo número');
   readln (num2);
   write ('introduzca el tercer número');
   readln (num3);

   mayor := num1;
   if num2 &amp;gt; mayor then
      mayor := num2;
   if num3 &amp;gt; mayor then
      mayor := num3;
   write ('el mayor es: ', mayor) ;

   menor := num1;
   if num2 &amp;lt; menor then
      menor := num2;
   if num3 &amp;lt; menor then
      menor := num3;
   write ('el menor es: ', menor)
end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/393536/393573/ReadMessage.aspx#393573</guid>
      <pubDate>Sat, 11 Jul 2009 00:00:34 -0700</pubDate>
    </item>
    <item>
      <title>Re: Appending to a Text file.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392797/392925/ReadMessage.aspx#392925</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392797/392925/ReadMessage.aspx#392925"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;This is from TP7 help, but may have been implemented before:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  Append (procedure)
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 Opens an existing file for appending.

  Declaration:
  procedure Append(var f: Text);
 where:
  f is a text-file variable.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
LOL Just realized this is for Textfiles only. Could use it as a text file &amp;amp; just do Read() instead of readln().&lt;br /&gt;
&lt;br /&gt;
Also, just found this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  var
   F: file;
  begin
   {$I-}
   Assign(F, FileName);
   &lt;strong&gt;FileMode := 2;  ( Set file access to read/write }&lt;/strong&gt;
   Reset(F);
   Close(F);
   {$I+}
   FileExists := (IOResult = 0) and (FileName &amp;lt;&amp;gt; '');
  end;  { FileExists }
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Change FileMode to Read/Write access. This should work.&lt;br /&gt;
&lt;br /&gt;
Otherwise something like this will work:&lt;br /&gt;
reset(file), rewrite(newfile), read data, write data, write new data, close(file), close(newfile), erase(file), rename (newfile, file).&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392797/392925/ReadMessage.aspx#392925</guid>
      <pubDate>Fri, 26 Jun 2009 18:50:11 -0700</pubDate>
    </item>
    <item>
      <title>Re: Appending to a Text file.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392797/392918/ReadMessage.aspx#392918</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392797/392918/ReadMessage.aspx#392918"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Early Pascal did not have &lt;strong&gt;seek&lt;/strong&gt; or &lt;strong&gt;blockwrite&lt;/strong&gt; so the solution suggested by Atex will not work either.  Probably the only solution is to copy the entire file to a scratch file, then write the new data to the scratch file.  If you are lucky your implementation will let you &lt;strong&gt;remove&lt;/strong&gt; your original file and &lt;strong&gt;rename&lt;/strong&gt; the scratch file, but most early Pascals did not have these capabilities.  Lacking these capabilities your only option will be the copy the scratch file back to your original, leaving the scratch file on the system.&lt;br /&gt;
&lt;br /&gt;
I think of "early Pascal", i.e., implementations based on the Jensen and Wirth descriptions, as an entirely different language than those based on the 1983 standard, e.g., Turbo Pascal, Free Pascal and Delphi.  Detractors of the language inevitably point out the Jensen/Wirth deficiencies, arguments have no validity when applied to modern implementations.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392797/392918/ReadMessage.aspx#392918</guid>
      <pubDate>Fri, 26 Jun 2009 14:26:10 -0700</pubDate>
    </item>
    <item>
      <title>Re: Appending to a Text file.</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392797/392868/ReadMessage.aspx#392868</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392797/392868/ReadMessage.aspx#392868"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;span style="color: Red;"&gt;: &lt;br /&gt;
: Unfortunately the problem seems to be with the open.  I seemingly &lt;br /&gt;
: only have rewrite (which erases the file before starting) and reset &lt;br /&gt;
: (which puts me into a read only mode on the file).  All regardless,&lt;br /&gt;
: to whether I am just writing text or record blocks. Seems to be&lt;br /&gt;
: quite a shortcoming in the early Pascal.&lt;br /&gt;
: &lt;br /&gt;
: Or am I missing something.&lt;br /&gt;
: &lt;/span&gt;&lt;br /&gt;
You're not missing anything.  These "shortcomings" of "early Pascal" was the driving force behind the 1983 standard and Turbo Pascal.  Is there something keep you from upgrading to a more modern implementation?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392797/392868/ReadMessage.aspx#392868</guid>
      <pubDate>Thu, 25 Jun 2009 20:20:08 -0700</pubDate>
    </item>
    <item>
      <title>Re: counting days/months/years</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392799/392812/ReadMessage.aspx#392812</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392799/392812/ReadMessage.aspx#392812"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Here's a program that I posted last year.  It takes a person's birthday and today's date as input, then computes the person's age in days.  That's the opposite of what you are trying to do, however, you may find some of the functions and procedures useful.  Sorry I can't do more right now but it's late and I need to get to bed.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Program Days ;

      Function Julian (Year: Word ; Month, Day : Byte) : LongInt ;

            Function IsLeap (Year : LongInt) : Boolean ;
            {
               a year is a leap year IF it's divisible by 4
               UNLESS it's also divisible by 100, then it's
               a leap year ONLY if it divisible by 400
            }
            begin
                 if Year DIV 4 = 0 then begin
                     if Year DIV 100 = 0 then begin
                         if Year DIV 400 = 0 then
                             IsLeap := TRUE
                         else
                             IsLeap := FALSE
                     end
                     else
                         IsLeap := TRUE
               end
               else
                   IsLeap := FALSE
            end ;

            Function DaysPriorToThisYear (Year : LongInt) : LongInt ;
              
            Var
                  i, Count : LongInt ;

            begin
                  Count := 0 ;

                  for i := 1 to Year - 1 do
                     if IsLeap(i) then
                        Count := Count + 366
                     else
                        Count := Count + 365 ;

                  DaysPriorToThisYear := Count
            end ;

            Function DaysPriorToThisMonth (Year, Month : LongInt) : LongInt ;
               
            CONST
               MonthDays : Array [FALSE .. TRUE, 1 .. 12] of LongInt
                         = ((31,28,31,30,31,30,31,31,30,31,30,31),
                            (31,29,31,30,31,30,31,31,30,31,30,31)) ;

            Var
               i, Count : LongInt ;

            begin
               Count := 0 ;

               for i := 1 to Month - 1 do
                  if IsLeap(Year) then
                     Count := Count + MonthDays[TRUE, i]
                  else
                     Count := Count + MonthDays[FALSE, i]  ;

               DaysPriorToThisMonth := Count
            end ;
             
      begin
         Julian := DaysPriorToThisYear(Year) 
                 + DaysPriorToThisMonth(Year,Month) 
                 + Day
      end ;

Var
   Year0, Year1, Month0, Month1, Day0, Day1, BirthDay, Today : LongInt ;

begin
   Write ('Enter year of birth:   ') ;  ReadLn (Year0) ;
   Write ('Enter month of birth:  ') ;  ReadLn (Month0) ;
   Write ('Enter day of birth:    ') ;  ReadLn (Day0) ;
   WriteLn ;

   Write ('Enter today''s year:    ') ;  ReadLn (Year1) ;
   Write ('Enter today''s month:   ') ;  ReadLn (Month1) ;
   Write ('Enter today''s day:     ') ;  ReadLn (Day1) ;

   BirthDay := Julian (Year0, Month0, Day0) ;
   Today    := Julian (Year1, Month1, Day1) ; 

   WriteLn (Today   :10) ;
   WriteLn (Birthday:10) ;
    
   WriteLn ('The person is ', Today - BirthDay, ' days old.')
end.
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392799/392812/ReadMessage.aspx#392812</guid>
      <pubDate>Wed, 24 Jun 2009 21:14:29 -0700</pubDate>
    </item>
    <item>
      <title>Re: need help with guessing game</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392718/392747/ReadMessage.aspx#392747</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392718/392747/ReadMessage.aspx#392747"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;I would suggest using a &lt;strong&gt;boolean&lt;/strong&gt; type instead of &lt;strong&gt;char&lt;/strong&gt; &amp;amp; &lt;strong&gt;integer&lt;/strong&gt;. &lt;strong&gt;Boolean&lt;/strong&gt; types allow only &lt;strong&gt;True&lt;/strong&gt; &amp;amp; &lt;strong&gt;false&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
Also, I would suggest you use a function instead of a procedure for your &lt;strong&gt;checkifexists&lt;/strong&gt; and let the program calling it write the response.&lt;br /&gt;
Also, most of the time there is no need to write things multiple times. If you are, chances are you can comine them into one section somehow.&lt;br /&gt;
&lt;br /&gt;
Example with some code removed:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;: 
uses wincrt;
var
  x : Integer;
  guess_array: array [1..100] of &lt;strong&gt;boolean&lt;/strong&gt;;

function checkifexists&lt;strong&gt;(guess : integer) : boolean&lt;/strong&gt;;
begin
     if guess_array[guess] = true then  
        &lt;strong&gt;checkifexists := true&lt;/strong&gt;
     else
        &lt;strong&gt;checkifexists := false;&lt;/strong&gt;
end;   


procedure main_game;
begin 

     {... Reinsert your loop and stuff here ...}

     writeln('guess a number between 1 and 100');
     readln (guess);
     writeln;

     if (guess &amp;lt;= 0) then
        WriteLn('You have guessed a number smaller than 1!')

     else if (guess &amp;gt;= 100) then
        WriteLn('You have guessed a number larger than 99!')

     else if (checkifexists = true) then
        WriteLn('You have already guessed that number!')

     else { number is between 1 and 99 and hasn't been guessed yet }
     Begin
        guess_array[guess] := true;
        inc(guess_total);

        if guess &amp;gt; secret_number then
           writeln('you have guessed too high');

        if guess &amp;lt; secret_number then
           writeln('you guessed too low');

        if guess = secret_number then
        begin
             writeln ('grats you guessed to correct number', secret_number);
             writeln('your total number of guesses was ',guess_total);        
        end;
     End;

     {... any other needed code ...}

end;

begin
     repeat
           clrscr;
           { Clear all guesses }
           For x := 1 to 100 do
               guess_array[x] := false;
           main_game;
           writeln('Do you want to play again?');
           readln (answer);           
     until Not(answer In['y','Y']);
     donewincrt;                 
end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I would've kept your loop code, but I wasn't expecting to write this much when I started. Hope this helps give you an idea of how you can make your code shorter and cleaner.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392718/392747/ReadMessage.aspx#392747</guid>
      <pubDate>Tue, 23 Jun 2009 19:56:27 -0700</pubDate>
    </item>
    <item>
      <title>Re: Program Record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392548/392598/ReadMessage.aspx#392598</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392548/392598/ReadMessage.aspx#392598"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;I get no errors.  This works as far as getting the password.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program User_Registration;

uses
  Crt;

Type
   Userrecord = Record
      Password    : string;
      Username    : string;
      Password_ID : integer;
      Username_ID : integer;
   end;

Var
   Index    : integer;
   Temp     : string;
   I        : integer;
   n        : integer;
   Database : array [0..100] of string;
   User     : Userrecord;

Begin
   Index:=0;
   randomize;
   writeln('User Registration Area');
   writeln('');
   writeln('');
   { Eingabe des Usernamen }
   write('Username: ');
   readln(User.Username);
                                                
   { überprüfung ob der Username bereits existiert }
   for I:= 1 to 100 do begin
      if User.Username = 'Database[0..100]' then begin
         repeat
            write('Username: ');
            readln(User.Username)
         until User.Username &amp;lt;&amp;gt; 'Database[0..100]';
      end;
   end;
   Index:=Index+1;
   Database[Index]:=User.Username;
                                                
   { Eingabe des Passworts }
   write('Password: ');
   readln(User.Password);
   writeln('');
                                                
   { Konfirmation des Passworts }
   write('Please confirm Password: ');
   readln(TEMP);
                                                 
   {überprüfung des Passwortes}
   if User.Password &amp;lt;&amp;gt; Temp then begin
      writeln(' Password doesnt match Confirmation');
      writeln('');
      repeat
         
         write('Password: ');
                                             
         readln(User.Password);
         writeln('');
         write('Please confirm Password: ');
         readln(TEMP);
      until User.Password = Temp;
   end;
   for I:= 1 to 100 do
        writeln('Database[0..Index]');
   {  Zuweisung einer Identifikationsnummer  }
end.
&lt;/pre&gt;&lt;br /&gt;
Which implementation of Pascal are you using?&lt;br /&gt;
&lt;br /&gt;
Try this.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   with User do
      readln(Username);
&lt;/pre&gt;&lt;br /&gt;
Or this.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   for j := 1 to Length(User.Username) do
      read(User.Username[j]);
   readln
&lt;/pre&gt;&lt;br /&gt;
or a combination.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   with User do
      for j := 1 to Length(UserName) do
         read(UserName[j]
      readln ;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392548/392598/ReadMessage.aspx#392598</guid>
      <pubDate>Sat, 20 Jun 2009 19:10:37 -0700</pubDate>
    </item>
    <item>
      <title>Re: Program Record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392548/392556/ReadMessage.aspx#392556</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392548/392556/ReadMessage.aspx#392556"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;: Here is my Code&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;: program User_Registration;
: 
: uses
:   Crt;
: 
: Type
:     Userrecord= Record
:           Password: string;
:           Username: string;
:           Password_ID: integer;
:           Username_ID: integer;
: end;
: 
: Var
: 
:    Index: integer;
:    Temp: string;
:    I: integer;
:    n: integer;
:    Database: array [0..100] of string;
:    &lt;span style="color: Red;"&gt;User: Userrecord;&lt;/span&gt;
: 
: 
: Begin
: 
: 
: 
:                 Index:=0;
:                 randomize;
:                 writeln('User Registration Area');
:                 writeln('');
:                 writeln('');
:                                                 {Eingabe des Usernamen}
:                 write('Username: ');
:                 &lt;span style="color: Red;"&gt;readln(Userrecord.Username);&lt;/span&gt;
:                                                 {überprüfung ob der Username bereits existiert}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
You declare userrecord as User, but then don't use it. You need to change all your record pointer names from "userrecord" to "User"&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
readln(User.Username);
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I haven't checked the rest of the code thouroughly, but try this first.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392548/392556/ReadMessage.aspx#392556</guid>
      <pubDate>Fri, 19 Jun 2009 19:00:19 -0700</pubDate>
    </item>
    <item>
      <title>Re: Program Record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392548/392555/ReadMessage.aspx#392555</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392548/392555/ReadMessage.aspx#392555"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;: Here is my Code&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;: program User_Registration;
: 
: uses
:   Crt;
: 
: Type
:     Userrecord= Record
:           Password: string;
:           Username: string;
:           Password_ID: integer;
:           Username_ID: integer;
: end;
: 
: Var
: 
:    Index: integer;
:    Temp: string;
:    I: integer;
:    n: integer;
:    Database: array [0..100] of string;
:    &lt;span style="color: Red;"&gt;User: Userrecord;&lt;/span&gt;
: 
: 
: Begin
: 
: 
: 
:                 Index:=0;
:                 randomize;
:                 writeln('User Registration Area');
:                 writeln('');
:                 writeln('');
:                                                 {Eingabe des Usernamen}
:                 write('Username: ');
:                 &lt;span style="color: Red;"&gt;readln(Userrecord.Username);&lt;/span&gt;
                  &lt;span style="color: Red;"&gt;{
                      &lt;strong&gt;Userrecord&lt;/strong&gt; is a type, not a variable.
                      Use &lt;strong&gt;User&lt;/strong&gt; instead of &lt;strong&gt;Userrecord&lt;/strong&gt; 
                  }&lt;/span&gt;
:                                                 {überprüfung ob der Username bereits existiert}
:                 for I:= 1 to 100 do
:                     begin
:                          if &lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Username = 'Database[0..100]' then
:                             begin
:                                  repeat
:                                        begin
:                                             write('Username: ');
:                                             readln(&lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Username);
:                                        end;
:                                  until &lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Username &amp;lt;&amp;gt; 'Database[0..100]';
:                             end;
:                     end;
:                 Index:=Index+1;
:                 Database[Index]:=&lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Username;
: 
: 
:                                                 {Eingabe des Passworts}
:      write('Password: ');
:      readln(&lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Password);
:      writeln('');
:                                                 {Konfirmation des Passworts}
:      write('Please confirm Password: ');
:      readln(TEMP);
:                                                  {überprüfung des Passwortes}
:      if &lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Password &amp;lt;&amp;gt; Temp then
:         begin
:              writeln(' Password doesnt match Confirmation');
:              writeln('');
:                          repeat
:                                begin
:                                     write('Password: ');
:                                     readln(&lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Password);
:                                     writeln('');
:                                     write('Please confirm Password: ');
:                                     readln(TEMP);
:                                end;
:                          until &lt;span style="color: Red;"&gt;Userrecord&lt;/span&gt;.Password = Temp;
:         end;
:         for I:= 1 to 100 do
:         writeln('Database[0..Index]');
:                                                  {Zuweisung einer Identifikationsnummer}
: end. &lt;/pre&gt;: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
By the way, &lt;strong&gt;begin .. end&lt;/strong&gt; is not necessary inside &lt;strong&gt;repeat .. until&lt;/strong&gt;.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392548/392555/ReadMessage.aspx#392555</guid>
      <pubDate>Fri, 19 Jun 2009 18:59:09 -0700</pubDate>
    </item>
    <item>
      <title>Re: Program Record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392548/392551/ReadMessage.aspx#392551</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392548/392551/ReadMessage.aspx#392551"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;You need to post more of your code.  There's not enough here to tell what is happening.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392548/392551/ReadMessage.aspx#392551</guid>
      <pubDate>Fri, 19 Jun 2009 16:04:36 -0700</pubDate>
    </item>
    <item>
      <title>Re: Program Record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392548/392550/ReadMessage.aspx#392550</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392548/392550/ReadMessage.aspx#392550"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;You need to post more of your code.  There's not enough here to tell what is happening.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392548/392550/ReadMessage.aspx#392550</guid>
      <pubDate>Fri, 19 Jun 2009 16:03:49 -0700</pubDate>
    </item>
    <item>
      <title>Re: Moving from byteint array to record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392258/392299/ReadMessage.aspx#392299</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392258/392299/ReadMessage.aspx#392299"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;How about Move();&lt;br /&gt;
&lt;br /&gt;
Just copy all the data from the ByteArray to the start address of the custfile. This should fill in all the data.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
 Move(bulkfile.bulk, custfile, 28);
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392258/392299/ReadMessage.aspx#392299</guid>
      <pubDate>Sat, 13 Jun 2009 12:46:04 -0700</pubDate>
    </item>
    <item>
      <title>Re: Moving from byteint array to record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392258/392294/ReadMessage.aspx#392294</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392258/392294/ReadMessage.aspx#392294"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;: I &lt;br /&gt;
: may be asking for a ability that does not exist.  But simplistically &lt;br /&gt;
: I am looking for:&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: custfile:=bulkfile.bulk[1..28];&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
I'm fairly certain that such a thing does not exist in classical Pascals such as described by Jensen and Wirth.&lt;br /&gt;
&lt;br /&gt;
I think you might be able to do something like this in Turbo Pascal or FreePascal.  I'd have to give it some thought as to exactly how.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392258/392294/ReadMessage.aspx#392294</guid>
      <pubDate>Sat, 13 Jun 2009 08:43:00 -0700</pubDate>
    </item>
    <item>
      <title>Re: Moving from byteint array to record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392258/392265/ReadMessage.aspx#392265</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392258/392265/ReadMessage.aspx#392265"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;pre class="sourcecode"&gt;
: bulkrec = record
:   job          : LongInt;    
:   relation     : packed array [1..8] of char;
:   reclen       : LongInt;
:   bulk : array [1.. 1000] of ByteInt;
: 
: pbulkrec = ^bulkrec;
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;strong&gt;and then I have another record like:&lt;/strong&gt;&lt;br /&gt;
: &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
: custfile = record
:    custnum  : ShortNat;
:      group  : ShortNat;
:       name  : packed array [1..20] of char;
:       flag1 : boolean;
:       flag2 : boolean;
:       flag3 : boolean;
:       flag4 : boolean;
: end;
: 
: pcustfile = ^custfile;
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: Problem then is that the bulkrec.bulk field actually&lt;br /&gt;
: holds the custfile data and I want to move it from that&lt;br /&gt;
: array into custfile record... i.e.&lt;br /&gt;
: &lt;br /&gt;
: custnum is a 2 byte field so the concatenation of  &lt;br /&gt;
: bulk[1] and bulk[2] holds its value.&lt;br /&gt;
: &lt;br /&gt;
: group also is a 2 byte field so the concatenation of&lt;br /&gt;
: bulk[3] and bulk[4] holds its value.&lt;br /&gt;
: &lt;br /&gt;
: name is 20 byte field and thus&lt;br /&gt;
: bulk[5] thru bulk[24] hold its value.&lt;br /&gt;
:&lt;br /&gt;
: flags1-4 hold 1 byte a piece &lt;br /&gt;
: bulk[25] to bulk[28] respectively.&lt;br /&gt;
: &lt;br /&gt;
: How do I make this assignment from the bulkrec.bulk&lt;br /&gt;
: variable to the custfile record???&lt;br /&gt;
: &lt;br /&gt;
: Any help appreciated.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The first problem I see is your declarations&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   pbulkrec  : ^bulkrec;
   pcustfile : ^custfile;
&lt;/pre&gt;&lt;br /&gt;
where you declare &lt;strong&gt;pbulkrec&lt;/strong&gt; and &lt;strong&gt;pcustfile&lt;/strong&gt; as pointers.  The "problem" is that having to reference and de-reference the adds to the complexity and gets in the way of addressing the other issues.  I have not idea why you declare these as pointers instead of variables, but I'm going to address your other issues in terms of this declaration:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   pbulkrec  : bulkrec;
   pcustfile : custfile;
&lt;/pre&gt;&lt;br /&gt;
If you really need these to be pointers I'll leave it to you to make that adjustment.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
: custnum is a 2 byte field so the concatenation of  &lt;br /&gt;
: bulk[1] and bulk[2] holds its value.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
I'm assuming that the definition of &lt;strong&gt;BulkRec&lt;/strong&gt; is being forced upon you by some existing software or data.  If so then the method of "concatenation" is ambiguous and we have to guess how the original programmer did it.  The simplest would be&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   with pbulkrec do
      with pcustfile do
         CustNum := 128*Bulk[1] + Bulk[2] ; 
&lt;/pre&gt;&lt;br /&gt;
This assumes that &lt;strong&gt;Bulk[1]&lt;/strong&gt; is the most significant byte, but it could be that &lt;strong&gt;Bulk[2]&lt;/strong&gt; is the MSB.&lt;br /&gt;
&lt;br /&gt;
However, &lt;strong&gt;Bulk&lt;/strong&gt; is signed and &lt;strong&gt;CustNum&lt;/strong&gt; is unsigned.  I think this is more likely:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   with pbulkrec do
      with pcustfile do
         CustNum := (256*(Bulk[1] + 128) MOD 32768) + (Bulk[2] + 128 ; 
&lt;/pre&gt;&lt;br /&gt;
Adding 128 to each &lt;strong&gt;Bulk&lt;/strong&gt; element shifts it into positive territory, and the MOD operator keeps &lt;strong&gt;CustNum&lt;/strong&gt; in range.  Of course this assumes that the original programmer took this same approach.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
: name is 20 byte field and thus&lt;br /&gt;
: bulk[5] thru bulk[24] hold its value.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   for i := 1 to 20 do
      name[i] := bulk[i + 4] ;  &lt;span style="color: Red;"&gt;{ there may be problems with pack and unpack }&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
: flags1-4 hold 1 byte a piece &lt;br /&gt;
: bulk[25] to bulk[28] respectively.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
   flag1 := (bulk[25] = 0) ; &lt;span style="color: Red;"&gt;{ assume zero means FALSE }&lt;/span&gt;
   flag2 := (bulk[26] = 0) ; &lt;span style="color: Red;"&gt;{ any else means TRUE }&lt;/span&gt;
   flag3 := (bulk[27] = 0) ;
   flag4 := (bulk[28] = 0) ;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
What do &lt;strong&gt;Bulk[29] .. Bulk[1000]&lt;/strong&gt; hold ?&lt;br /&gt;
&lt;br /&gt;
What implementation of Pascal are you using?  What kind of computer and operating system?&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392258/392265/ReadMessage.aspx#392265</guid>
      <pubDate>Fri, 12 Jun 2009 20:49:15 -0700</pubDate>
    </item>
    <item>
      <title>Re: Moving from byteint array to record</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392258/392259/ReadMessage.aspx#392259</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392258/392259/ReadMessage.aspx#392259"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;What is a ByteInt?  What is a ShortNat?&lt;br /&gt;
&lt;br /&gt;
Neither of these terms is part of modern Pascal.&lt;br /&gt;
&lt;br /&gt;
I'm guessing that&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Type
   ByteInt = 0 .. 255 ;  { i.e., type Byte }
   ShortNat = -128 .. 127 ;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
By the way the word &lt;strong&gt;packed&lt;/strong&gt; is obsolete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392258/392259/ReadMessage.aspx#392259</guid>
      <pubDate>Fri, 12 Jun 2009 17:25:26 -0700</pubDate>
    </item>
    <item>
      <title>Re: no way to get the console handle</title>
      <link>http://www.programmersheaven.com/mb/pasprog/392085/392097/ReadMessage.aspx#392097</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/392085/392097/ReadMessage.aspx#392097"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Post your code.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/392085/392097/ReadMessage.aspx#392097</guid>
      <pubDate>Tue, 09 Jun 2009 11:57:56 -0700</pubDate>
    </item>
    <item>
      <title>Re: plz help me matrix multiplication 7 * 7 !</title>
      <link>http://www.programmersheaven.com/mb/pasprog/391880/391928/ReadMessage.aspx#391928</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/391880/391928/ReadMessage.aspx#391928"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;There are times when brute force is the best option.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Type
   Matrix = array [1 .. 7, 1 .. 7] of Integer ;
   Survey = array [1 .. 49] of Integer ;

   Procedure DoSurvey (Var S : Survey ; M : Matrix) ;
   begin
      S[1]  := M[1,1] ;
      S[2]  := M[2,1] ;
      S[3]  := M[3,1] ;
      S[4]  := M[4,1] ;
      S[5]  := M[5,1] ;
      S[6]  := M[6,1] ;
      S[7]  := M[7,1] ;
      S[8]  := M[7,2] ;
      S[9]  := M[7,3] ;
      S[10] := M[7,4] ;
      S[11] := M[7,5] ;
      S[12] := M[7,6] ;
      S[13] := M[7,7] ;
      S[14] := M[6,7] ;
      S[15] := M[5,7] ;
      S[16] := M[4,7] ;
      S[17] := M[3,7] ;
      S[18] := M[2,7] ;
      S[19] := M[1,7] ;
      S[20] := M[1,6] ;
      S[21] := M[1,5] ;
      S[22] := M[1,4] ;
      S[23] := M[1,3] ;
      S[24] := M[1,2] ;
      S[25] := M[2,2] ;
      S[26] := M[3,2] ;
      S[27] := M[4,2] ;
      S[28] := M[5,2] ;
      S[29] := M[6,2] ;
      S[30] := M[6,3] ;
      S[31] := M[6,4] ;
      S[32] := M[6,5] ;
      S[33] := M[6,6] ;
      S[34] := M[5,6] ;
      S[35] := M[4,6] ;
      S[36] := M[3,6] ;
      S[37] := M[2,6] ;
      S[38] := M[2,5] ;
      S[39] := M[2,4] ;
      S[40] := M[2,3] ;
      S[41] := M[3,3] ;
      S[42] := M[4,3] ;
      S[43] := M[5,3] ;
      S[44] := M[5,4] ;
      S[45] := M[5,5] ;
      S[46] := M[4,5] ;
      S[47] := M[3,5] ;
      S[48] := M[3,4] ;
      S[49] := M[4,4]
   end ;
&lt;/pre&gt;&lt;br /&gt;
Although crude, this solution is straightforward and easy to understand, a very important consideration.  It may even be faster and more efficient than a more complex solution.  You have to measure to be sure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/391880/391928/ReadMessage.aspx#391928</guid>
      <pubDate>Thu, 04 Jun 2009 13:42:09 -0700</pubDate>
    </item>
    <item>
      <title>Re: tic tac toe game</title>
      <link>http://www.programmersheaven.com/mb/pasprog/391817/391819/ReadMessage.aspx#391819</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/391817/391819/ReadMessage.aspx#391819"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Google "tic tac toe pascal."&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/391817/391819/ReadMessage.aspx#391819</guid>
      <pubDate>Mon, 01 Jun 2009 11:01:00 -0700</pubDate>
    </item>
    <item>
      <title>Re: NEED IMMEDIATE HELP -- PLEASE !</title>
      <link>http://www.programmersheaven.com/mb/pasprog/391456/391793/ReadMessage.aspx#391793</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/391456/391793/ReadMessage.aspx#391793"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;You can use a 1D or 2D array to do this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
VAR
   {1D Array}
   Board : Array[1..9] Of Char;

   {2D Array}
   Board : Array[1..3,1..3] Of Char; { 3x3 = 9 }
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Either way works well. For the examples, I am using box 5:&lt;br /&gt;
&lt;br /&gt;
With a 1D array it's easy to select the box that the user chooses, as Spot 5 on the board = Board[&lt;strong&gt;5&lt;/strong&gt;].&lt;br /&gt;
With a 2D array Spot 5 on the board = Board[&lt;strong&gt;1,2&lt;/strong&gt;] or Board[5 DIV 3, 5 MOD 3].&lt;br /&gt;
&lt;br /&gt;
But for drawing the X or O onto the board, a 2D array is setup the same as the board, so:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  { 1D array }
  for y := 1 to 3 do
    for x := 1 to 3 do
    begin
      gotoXY(x*3,y*3);
      write(Board[&lt;strong&gt;(y-1)*3 + x&lt;/strong&gt;]);
    end;

  { 2D array }
  for y := 1 to 3 do
    for x := 1 to 3 do
    begin
      gotoXY(x*3,y*3);
      write(Board[&lt;strong&gt;x,y&lt;/strong&gt;]);
    end;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Either way has its advantages and disadvantages, but both work basically the same. (Oh, and now you have some needed code too ;)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/391456/391793/ReadMessage.aspx#391793</guid>
      <pubDate>Sun, 31 May 2009 23:56:46 -0700</pubDate>
    </item>
    <item>
      <title>TatukGIS Editor 2.0</title>
      <link>http://www.programmersheaven.com/download/56106/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/TatukGIS/"&gt;TatukGIS&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/56106/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;The TatukGIS Editor is a well designed GIS desktop application supporting the features that would typically be expected of a GIS editing software, including advanced support for coordinate systems and a huge number of data formats. For custom solution designers with specialized or more advanced requirements, the Editor supports a built-in Basic and Pascal scripting IDE that exposes the full power of the TatukGIS Developer Kernel (SDK) (with its hundreds of classes and thousands of methods) within the Editor. The Editor product is intuitive and learnable just from the integrated help files.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/56106/download.aspx</guid>
      <pubDate>Fri, 29 May 2009 12:35:22 -0700</pubDate>
    </item>
    <item>
      <title>TatukGIS Editor 2.0</title>
      <link>http://www.programmersheaven.com/download/56106/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/TatukGIS/"&gt;TatukGIS&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/56106/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;The TatukGIS Editor is a well designed GIS desktop application supporting the features that would typically be expected of a GIS editing software, including advanced support for coordinate systems and a huge number of data formats. For custom solution designers with specialized or more advanced requirements, the Editor supports a built-in Basic and Pascal scripting IDE that exposes the full power of the TatukGIS Developer Kernel (SDK) (with its hundreds of classes and thousands of methods) within the Editor. The Editor product is intuitive and learnable just from the integrated help files.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/56106/download.aspx</guid>
      <pubDate>Fri, 29 May 2009 12:33:33 -0700</pubDate>
    </item>
    <item>
      <title>TatukGIS Editor 2.0</title>
      <link>http://www.programmersheaven.com/download/56106/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/TatukGIS/"&gt;TatukGIS&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/56106/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;The TatukGIS Editor is a well designed GIS desktop application supporting the features that would typically be expected of a GIS editing software, including advanced support for coordinate systems and a huge number of data formats. For custom solution designers with specialized or more advanced requirements, the Editor supports a built-in Basic and Pascal scripting IDE that exposes the full power of the TatukGIS Developer Kernel (SDK) (with its hundreds of classes and thousands of methods) within the Editor. The Editor product is intuitive and learnable just from the integrated help files.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/56106/download.aspx</guid>
      <pubDate>Fri, 29 May 2009 12:32:44 -0700</pubDate>
    </item>
    <item>
      <title>TatukGIS Editor 2.0</title>
      <link>http://www.programmersheaven.com/download/56106/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/TatukGIS/"&gt;TatukGIS&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/56106/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;The TatukGIS Editor is a well designed GIS desktop application supporting the features that would typically be expected of a GIS editing software, including advanced support for coordinate systems and a huge number of data formats. For custom solution designers with specialized or more advanced requirements, the Editor supports a built-in Basic and Pascal scripting IDE that exposes the full power of the TatukGIS Developer Kernel (SDK) (with its hundreds of classes and thousands of methods) within the Editor. The Editor product is intuitive and learnable just from the integrated help files.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/56106/download.aspx</guid>
      <pubDate>Fri, 29 May 2009 12:30:33 -0700</pubDate>
    </item>
    <item>
      <title>Re: NEED IMMEDIATE HELP -- PLEASE !</title>
      <link>http://www.programmersheaven.com/mb/pasprog/391456/391693/ReadMessage.aspx#391693</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/skobin/"&gt;skobin&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/391456/391693/ReadMessage.aspx#391693"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;img src="http://www.upload.co.il/pascal/games/img/XOGAME.jpg" /&gt;&lt;br /&gt;
This is a full tic tac toe game in pascal, maybe it will help&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/391456/391693/ReadMessage.aspx#391693</guid>
      <pubDate>Fri, 29 May 2009 07:39:05 -0700</pubDate>
    </item>
    <item>
      <title>Re: Does my first language really matter?</title>
      <link>http://www.programmersheaven.com/mb/general/391667/391676/ReadMessage.aspx#391676</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Lundin/"&gt;Lundin&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/general/391667/391676/ReadMessage.aspx#391676"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/general/Board.aspx"&gt;General programming&lt;/a&gt; forum.&lt;/p&gt;Who says you shouldn't learn Java?! On the contrary, I would strongly recommend Java or C# as first language. Simply because these two languages have sane, structured syntax. They are both by far the best languages for object-orientation, which is the completely dominant way to write programs nowadays.&lt;br /&gt;
&lt;br /&gt;
Another alternative is Object Pascal / Delphi. Pascal has always been known as the "student language". But it is also a dying language.&lt;br /&gt;
&lt;br /&gt;
C is ok for beginners. It has a rather complicated, messy syntax and there are plenty of pitfalls, but on a hobbyist level it is rather straight-forward language.&lt;br /&gt;
&lt;br /&gt;
C++ is like C, only much more complex. Like C, it has a messy syntax. It has object orientation support, but it isn't pretty. C++ is likely the most complex programming language of them all. I would suggest picking it as the second language to learn.&lt;br /&gt;
&lt;br /&gt;
Stay far, far away from Visual Basic. It was written by lunatics, to be used by idiots. I have programmed plenty in VB5/VB6/VB.NET/VBA so I know what I'm talking about. The language stinks.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/general/391667/391676/ReadMessage.aspx#391676</guid>
      <pubDate>Fri, 29 May 2009 02:22:57 -0700</pubDate>
    </item>
    <item>
      <title>Re: Database Application Assignment</title>
      <link>http://www.programmersheaven.com/mb/pasprog/391414/391521/ReadMessage.aspx#391521</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/391414/391521/ReadMessage.aspx#391521"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Unless you catch someone on a day where they feel extremely bored, I don't think you will find anyone to write this program for you.&lt;br /&gt;
We are here to help people learn, not write their assignments.&lt;br /&gt;
You will have to do it yourself, but we'll help you.&lt;br /&gt;
&lt;br /&gt;
Start by making a test text file in notepad (or similar). Create 15 records. Use three lines per record. If you're doing baseball, use something like first line is for Name, second line for Hits, third line for RBI.&lt;br /&gt;
&lt;br /&gt;
Then write the program that creates the datafile from this. It will need to have:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
TYPE
   PlayerInfo = record
      Name : String;
      Hits : Word;
      RBI  : Word;
   End;

VAR
  Players : Array[1..15] Of PlayerInfo;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Then load the text file in a loop, three lines at a time and store the info into each player.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
PLAYERS[count].Name := Line1;
PLAYERS[count].Hits := Line2;
PLAYERS[count].RBI  := Line3;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This is the general idea anyways. Your teacher should be able to help you get started and we'll help you along as well.&lt;br /&gt;
&lt;br /&gt;
BTW WriteLn() shows text to the screen. &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/391414/391521/ReadMessage.aspx#391521</guid>
      <pubDate>Tue, 26 May 2009 00:55:45 -0700</pubDate>
    </item>
    <item>
      <title>Re: File not found errorcode 2</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390770/390893/ReadMessage.aspx#390893</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390770/390893/ReadMessage.aspx#390893"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;: &lt;pre class="sourcecode"&gt;: 
: program p476sub7(input, output, &lt;strong&gt;outerfile&lt;/strong&gt;);
: var
: &lt;strong&gt;outerfile&lt;/strong&gt; : text;
: &lt;/pre&gt;:&lt;br /&gt;
&lt;span style="color: Blue;"&gt; &lt;br /&gt;
: You are using the same name for both. I've only worked with TP7, but &lt;br /&gt;
: I assume that the top line is aruments passed to the program. Try &lt;br /&gt;
: using different names for each:&lt;br /&gt;
: &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
In Jensen and Wirth Pascal the program line was used to declare text files.  I.e.,&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program p476sub7(input, output, &lt;strong&gt;outerfile&lt;/strong&gt;);
&lt;/pre&gt;&lt;br /&gt;
was equivalent to&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program p476sub7 ;
var
   input, output, outerfile : text ;
&lt;/pre&gt;&lt;br /&gt;
Using this notation J&amp;amp;W Pascal automatically opened &lt;strong&gt;input&lt;/strong&gt; and &lt;strong&gt;output&lt;/strong&gt; for reading and writing respectively, i.e., you did not need &lt;strong&gt;reset(input)&lt;/strong&gt; or &lt;strong&gt;rewrite(output)&lt;/strong&gt;.  As I understand it access to &lt;strong&gt;outerfile&lt;/strong&gt; was via the &lt;strong&gt;get&lt;/strong&gt; and &lt;strong&gt;put&lt;/strong&gt; procedures, which Turbo Pascal does not implement.&lt;br /&gt;
&lt;br /&gt;
Since many programmers would still begin a program with&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program p476sub7 (input, output) ;
&lt;/pre&gt;&lt;br /&gt;
Turbo Pascal still allowed this sort of notation in the name of limited backward compatibility.  But, in effect, anything between the parentheses on the program line is a comment.  Thus the presence of &lt;strong&gt;outerfile&lt;/strong&gt; on the program line does not conflict with the later declaration of &lt;strong&gt;outerfile&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390770/390893/ReadMessage.aspx#390893</guid>
      <pubDate>Tue, 12 May 2009 10:57:23 -0700</pubDate>
    </item>
    <item>
      <title>Re: File not found errorcode 2</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390770/390891/ReadMessage.aspx#390891</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390770/390891/ReadMessage.aspx#390891"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;strong&gt;The problem is that 'outerfile' is more than 8 characters.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
I assume that you are using Turbo Pascal, which predates Microsoft's implementation of long file names.  The program is looking for a file named 'outerfil'.  Copy 'outerfile' to 'outerfil' and the program should work.   &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt; 
: program p476sub7(input, output, outerfile);
: USES CRT;
: {can read up to 400 characters}
: var
: totchar : integer;
: outerfile : text;
: A1B1 : string;
: alphastore : Array[1..400] of char;
: whatitsays : string;
: i,j,k : integer;
: begin
: A1B1 := &lt;span style="color: Red;"&gt;'outerfile'&lt;/span&gt;;
: assign(outerfile, A1B1);
: reset(outerfile);
: writeln(outerfile);
: readkey;
: end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390770/390891/ReadMessage.aspx#390891</guid>
      <pubDate>Tue, 12 May 2009 10:22:08 -0700</pubDate>
    </item>
    <item>
      <title>Re: Help in making a game</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390725/390865/ReadMessage.aspx#390865</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/skobin/"&gt;skobin&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390725/390865/ReadMessage.aspx#390865"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;I will arrange the code maybe I will try to port it to free pascal.&lt;br /&gt;
&lt;br /&gt;
as for now I will explain a bit:&lt;br /&gt;
&lt;br /&gt;
the main game parts:&lt;br /&gt;
&lt;br /&gt;
initialize:&lt;br /&gt;
  virtual screens, pallets, gui...&lt;br /&gt;
&lt;br /&gt;
main game loop:&lt;br /&gt;
repeat&lt;br /&gt;
   {go over the scrren}&lt;br /&gt;
   for x:=1 to 318 do for y:=1 to 198 do&lt;br /&gt;
   begin&lt;br /&gt;
      {cellular automatons logic: can be found in obj_fx}&lt;br /&gt;
      if(getpixel(x,y) = sand colors)then sand_logic&lt;br /&gt;
      ................  fire_logic&lt;br /&gt;
      .......&lt;br /&gt;
    end;&lt;br /&gt;
   &lt;br /&gt;
   {gui logic}&lt;br /&gt;
   &lt;br /&gt;
   {alot of junk}&lt;br /&gt;
until Esc&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390725/390865/ReadMessage.aspx#390865</guid>
      <pubDate>Tue, 12 May 2009 02:33:50 -0700</pubDate>
    </item>
    <item>
      <title>Anyone from the hangman series...</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390844/390844/ReadMessage.aspx#390844</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390844/390844/ReadMessage.aspx#390844"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Just wondering if anyone from the hangman exam came back here and if so how it all went.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390844/390844/ReadMessage.aspx#390844</guid>
      <pubDate>Mon, 11 May 2009 22:22:46 -0700</pubDate>
    </item>
    <item>
      <title>Re: From C to Pascal</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390797/390843/ReadMessage.aspx#390843</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390797/390843/ReadMessage.aspx#390843"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;GNU = Open Source&lt;br /&gt;
&lt;br /&gt;
Basically, you can do whatever you want, but can't sell it or profit from it in anyway.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390797/390843/ReadMessage.aspx#390843</guid>
      <pubDate>Mon, 11 May 2009 22:19:20 -0700</pubDate>
    </item>
    <item>
      <title>Re: File not found errorcode 2</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390770/390842/ReadMessage.aspx#390842</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390770/390842/ReadMessage.aspx#390842"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;pre class="sourcecode"&gt;
program p476sub7(input, output, &lt;strong&gt;outerfile&lt;/strong&gt;);
var
&lt;strong&gt;outerfile&lt;/strong&gt; : text;
&lt;/pre&gt;&lt;br /&gt;
You are using the same name for both. I've only worked with TP7, but I assume that the top line is aruments passed to the program. Try using different names for each:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program p476sub7(input, output, outerfile);
USES CRT;
{can read up to 400 characters}
var
  totchar : integer;
  &lt;strong&gt;outfile&lt;/strong&gt; : text;
  alphastore : Array[1..400] of char;
  whatitsays : string;
  i,j,k : integer;

begin
  &lt;strong&gt;assign(outfile, outerfile);&lt;/strong&gt;
  reset(outerfile);
  writeln(outerfile);
  readkey;
end.
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Try this.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390770/390842/ReadMessage.aspx#390842</guid>
      <pubDate>Mon, 11 May 2009 22:16:47 -0700</pubDate>
    </item>
    <item>
      <title>Re: From C to Pascal</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390797/390825/ReadMessage.aspx#390825</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390797/390825/ReadMessage.aspx#390825"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;The two files you attached are not the complete program.  My C++ compiler wants two other files:  &lt;em&gt;others.h&lt;/em&gt; and &lt;em&gt;scanners.h&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
I cannot find function &lt;strong&gt;main()&lt;/strong&gt; in either of the attached files so it must be in one of the other two, or else it's the weirdest C++ program I've ever come across.&lt;br /&gt;
&lt;br /&gt;
Does this program read data from a file?  If so I'll probably need it too.&lt;br /&gt;
&lt;br /&gt;
Finally, I have a concern.  Both files seem to have this opening comment:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
/*
 *  Copyright (C) 2007-2008 Sourcefire, Inc.
 *
 *  Authors: Alberto Wu
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *  MA 02110-1301, USA.
 */
&lt;/pre&gt;&lt;br /&gt;
I have no idea what is in "GNU General Public License version 2".  Does it permit translating the program into another language?&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390797/390825/ReadMessage.aspx#390825</guid>
      <pubDate>Mon, 11 May 2009 18:49:45 -0700</pubDate>
    </item>
    <item>
      <title>Re: From C to Pascal</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390797/390809/ReadMessage.aspx#390809</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390797/390809/ReadMessage.aspx#390809"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;br /&gt;
There's no attachment.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390797/390809/ReadMessage.aspx#390809</guid>
      <pubDate>Mon, 11 May 2009 10:29:28 -0700</pubDate>
    </item>
    <item>
      <title>Re: File not found errorcode 2</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390770/390787/ReadMessage.aspx#390787</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390770/390787/ReadMessage.aspx#390787"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;First, since 'outerfile' is used by Notepad, you may be leaving off an extension such as '.txt', meaning the actual name of the file is 'outerfile.txt'.  The extension could also be something like '.doc', '.rtf', etc.&lt;br /&gt;
&lt;br /&gt;
Second, since you are certain that 'outerfile' exists, you may have specify the path to it.  If you do not specify the path then by default p476sub7.exe will only look for it in the same directory where p476sub7.exe resides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390770/390787/ReadMessage.aspx#390787</guid>
      <pubDate>Mon, 11 May 2009 01:41:28 -0700</pubDate>
    </item>
    <item>
      <title>Re: Help in making a game</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390725/390736/ReadMessage.aspx#390736</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/skobin/"&gt;skobin&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390725/390736/ReadMessage.aspx#390736"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;Here is the code, it is messy,&lt;br /&gt;
tell we if you want to make it a game.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390725/390736/ReadMessage.aspx#390736</guid>
      <pubDate>Sun, 10 May 2009 00:29:21 -0700</pubDate>
    </item>
    <item>
      <title>Re: Interpretation of exam</title>
      <link>http://www.programmersheaven.com/mb/pasprog/389822/390735/ReadMessage.aspx#390735</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Phat+Nat/"&gt;Phat Nat&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/389822/390735/ReadMessage.aspx#390735"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;&lt;pre class="sourcecode"&gt;
FUNCTION CountLines(filename : String) : Word;
VAR
   t : text; { or : textfile; }
   Count : Word;
   Line : String;
Begin
  Assign(t, filename); Reset(t);
  Count := 0;
  While Not(Eof(t)) Do
  Begin
        ReadLn(t, Line);
        If Line &amp;lt;&amp;gt; "" Then Inc(Count);
  End;
  Close(t); { or closefile(t); }
  CountLines := Count;
End;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The above will load a text file and return how many lines are contained within, ignoring blank lines.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/389822/390735/ReadMessage.aspx#390735</guid>
      <pubDate>Sat, 09 May 2009 20:43:21 -0700</pubDate>
    </item>
    <item>
      <title>Help in making a game</title>
      <link>http://www.programmersheaven.com/mb/pasprog/390725/390725/ReadMessage.aspx#390725</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/skobin/"&gt;skobin&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/pasprog/390725/390725/ReadMessage.aspx#390725"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;I have made cellular automata called Pixelgarde. &lt;br /&gt;
many different kinds of cellular automata and fuzzy logic are used to create complex life like behaviors. &lt;br /&gt;
the automatons used in the game simulate: plants, flowers, bugs, fire, sand....&lt;br /&gt;
&lt;br /&gt;
I want to make it a puzzle game but I don't have allot of ideas.&lt;br /&gt;
&lt;br /&gt;
you can play with the sandbox form at:&lt;br /&gt;
&lt;a href="http://www.gameprojects.com/project/?id=08e5d6049b"&gt;http://www.gameprojects.com/project/?id=08e5d6049b&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
any suggestions, or if some one wloud like to help?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/390725/390725/ReadMessage.aspx#390725</guid>
      <pubDate>Sat, 09 May 2009 13:11:04 -0700</pubDate>
    </item>
  </channel>
</rss>