Friday, 6 September 2013

Abstract error when splitting a string

Abstract error when splitting a string

when using this procedure, i am getting an abstract error (that's all it
says). i use this procedure in other projects, this is the first time i've
run into it. i'm not sure if it has to do with the syntax of the input
string.
procedure SplitString(const Delimiter: Char; Input: string; const Strings:
TStrings);
begin
//Delimits or splits the received string, returns TStrings array
Assert(Assigned(Strings)) ;
Strings.Clear;
Strings.Delimiter := Delimiter;
Strings.StrictDelimiter := True; //needed otherwise whitespace is used
to delimit
Strings.DelimitedText := Input;
end;
the application calls like this:
try
LBOMPartLine := TStrings.Create;
SplitString(',','C:\DATA\Parts\PART4.PS.0,10,10',LBOMPartLine);
...
I've removed some of the debug code that highlighted the fact that the
procedure fails, nothing after or before. Can I not use a comma as a
separator?

No comments:

Post a Comment