Problem with Arrays of strings - prob.txt [1/1]

In article <4cd9b4$...@wariat.wariat.org>, ba...@nacs.net says...

Quote
>grid:array[1..15] of string[80];
>if I say
>grid[5,5]:='W';
>writeln(grid[5]);       it says the string is blank.
>BUT If I say
>grid[5,5]:='W';
>for i:=1 to 80 do
> write(grid[5,i]);     it shows that it is W...

Strings in pascal have an element (StringName[0]) which contains the length of
the string. if you assign StringName[1]:= 'X' then writeln(StringName) it will
only show the number of charecters defined by the ordinal value of
StringName[0].

I hope this starts solving your problem.

--------------------------------------------------
/\/\ | |( [-    no e-mail yet      +44 1252 335805
Views are my personal views and not of my employer
-----------------------X--------------------------