Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split CSV Procedure problem

Status
Not open for further replies.

lloydie2

Programmer
Apr 21, 2003
75
GB
I have a procedure which I used in an old DLL, which is now causing me a little grief. I suspect it is the way I am using it or I may need to change it to a function.

Code:================================================

{*****************************************************
Split Data
******************************************************}
procedure TForm1.Split
(const Delimiter: Char;
Input: string;
const Strings: TStrings);
begin
Assert(Assigned(Strings)) ;
Strings.Clear;
Strings.Delimiter := Delimiter;
Strings.DelimitedText := Input;
end;


{*****************************************************
function to convert data from String
******************************************************}
function TForm1.ProcessSearch2(S : String) : String;
Begin
Split(',', S, A) ;
grpNum := A[1];
StartNum := A[2];
ExtNum := A[3];
TrunkNum := A[4];

richedit1.Lines.Append(grpNum);
richedit1.Lines.Append(StartNum);
richedit1.Lines.Append(ExtNum);
richedit1.Lines.Append(TrunkNum);
........
...
..
End;

================================================

Any Ideas?
 
What problem are you having?

buho (A).


 
Don't worry, I re-wrote the function and all is OK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top