actually i want to update the record in the array so if there is null space,i do not put it into the array.
However i can't have more idea about this
Ah ok. You would like to clean up your array from 'empty' answers ? Did i understood that correctly ?
In that case, a couple of questions arises
- Why put empty answers into the array to begin with ?
- Why use a static array ?
But, in order to satisfy your curiosity which follows your lead:
procedure CleanArray;
var
i, j : Integer;
begin
i := low(no);
for j := low(no) to High(no) do
begin
if (no[j] <> '') then
begin
no[i] := no[j];
If i <> j then no[j] := '';
inc(i);
end;
end;
WriteLn('Number of non empty items in array = ', Pred(i));
end;
Note though, that the above code is _not_ the way to go as it is too error-prone. I'm showing it in order to let you see why.