And to stay as close to OP solution (in which case OP is able to see his/her errors)
Uses SysUtils;
var
i, j : Integer;
Item : String;
sList : Array[0..10] of string;
begin
// Clear the list array
For i := low(slist) to high(slist) do sList[i] := '';
Item := '"1=ABC,2=XYZ"';
i := 1;
j := 0;
while i <= Length(Item)-1 do
begin
if Item[i] = ',' then
begin
j := j + 1;
end
else
begin
sList[j] := sList[j] + Item[i];
end;
i := i + 1;
end;
// show the list array
For i := low(slist) to high(slist) do
If (length(slist[i]) > 0) then writeln('entry ', inttostr(i), ' = ', slist[i]);
end;