Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-08

Why doesn't the Watch show what the array exactly is?

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Z.Zhang

Why doesn't the Watch show what the array exactly is?

I assigned an array
arr:array [1..3,1..3] of 0..1;
then did such lines as below:
fillchar(arr,sizeof(arr),0); {I bet this procedure is used properly, right?}
arr[1,3]:=1;
arr[2,1]:=1;
arr[3,1]:=1;
{or other lines alike}

What I observed in Watch windows, however, was not {{0,0,1},{1,0,0},{1,0,0}} Then I used
for i:=1 to 3 do

     for j:=1 to 3 do write(arr[i,j]:2);

Judging from the output, I guess that things "are" ok.

If the arr was defined like this:
arr:array [1..3,1..3] of integer;

Everything became alright.
----------------------------------
p.s. I am new with FP. And TP seems not to have such problems.