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?
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?