El Mié 13 Jul 2005 16:07, Micha Nelissen escribió: > > Don't you want 'ReadLn' ? > > What does Read do anyway, on PChars, strings and arrays ? > > Micha > Ok, i gave a bad example (and ReadLn works for that) but in my app i read a tile map from a text file. The format is very simple: The values are unsigned integers separated with spaces or newlines, for example: 0 0 1 0 0 0 0 0 1 0 2 2 0 0 1 0 2 2 0 3 3 3 3 2 0 3 3 0 3 3 0 0 0 1 1 1 The code to read the file looks like this (yeah, bad programming i know): for j := 0 to MAX_MAPY do for i := 0 to MAX_MAPX do Read(MapFile, Mapa[i, j]);
The point is that this worked before, but now loops forever (which is odd since is a 32x32 for, looks like the problem is in Read). I tried to use ReadLn instead, it doesn't hang but then i get only zeroes. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal