[fpc-pascal] Why doesn't the Watch show what the array exactly is?
Z.Zhang
xyghd at yeah.net
Mon Aug 8 17:46:41 CEST 2005
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.
More information about the fpc-pascal
mailing list