TYPE TARRY = array of string;
Procedure trimchar (s: string; var sret: tarray); Function Countchar (s: string; c: char): integer; var i: integer; begin result: = 0; for i: = 1 to length (s) do if S [I] = c then inc (result); end; var ipos: integer; i: integer
Begin setlength (SRET, Countchar (S, ',') 1); IPOS: = POS (',', s); i: = 0; While ipos> 0 do beg [i]: = COPY (S, 1, IPOS - 1); Delete (S, 1, IPOS); IPOS: = POS (',', s); Inc (i); end; sret [i]: = s; end; procedure tForm1.Button1Click Sender: TOBJECT); VAR SA: TARRAY; S: String; I: Integer; Begin S: = 'ABC, CD, MM, 44'; SA: = NIL; TrimChar (S, SA); for i: = LOW SA) to high (sa) do memo1.lines.add (sa [i]);