[fpc-pascal] System.Write broken?

John Coppens john at jcoppens.com
Thu Jul 14 03:55:56 CEST 2005

On Wed, 13 Jul 2005 19:55:33 -0500
Elio Cuevas Gómez <elio at mixtk.com> wrote:

> I tried your version, but didn't make much diference. Looks like Write
> is indeed broken, i'll report it as a bug. Thanks for all your help :).

I tried it here - works fine for me (See code tested below). A doubt: did
you correctly set the for loops... 0..MAX_MAPY is actually one more that
you might expect! As I cannot see the definition of MAX_MAPY, I don't
know if they're correct.

Anyways, this works (note 1..5 in array def, and loops):

program test;

  Map: array [1..6, 1..6] of integer;
  i, j: integer;
  MapFile: text;

  assign(MapFile, 'test.map');
  for j := 1 to 6 do begin
    for i := 1 to 6 do    
      Read(MapFile, Map[i, j]);
  for j := 1 to 6 do begin
    for i := 1 to 6 do    
      write(Map[i, j]:3);

More information about the fpc-pascal mailing list