From ccc3027b6b5e28593dfa50ba9bdaddcef6bdee3d Mon Sep 17 00:00:00 2001 From: dkolmck Date: Sat, 1 May 2010 18:55:53 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/kolmck/code@62 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07 --- KOL.pas | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/KOL.pas b/KOL.pas index f1b0b92..dba790e 100644 --- a/KOL.pas +++ b/KOL.pas @@ -856,7 +856,7 @@ type follow item indeces up by one. } procedure DeleteRange( Idx, Len: Integer ); {* Deletes Len items starting from Idx. } - procedure Remove( Value: Pointer ); + function Remove(Value: Pointer): Integer; {* Removes first entry of a Value in the list. } property Count: Integer read fCount write SetCount; {* Returns count of items in the list. It is possible to delete a number @@ -15568,12 +15568,11 @@ end; {$ENDIF ASM_VERSION} //[procedure TList.Remove] -procedure TList.Remove(Value: Pointer); -var I: Integer; +function TList.Remove(Value: Pointer): Integer; begin - I := IndexOf( Value ); - if I >= 0 then - Delete( I ); + Result := IndexOf( Value ); + if Result >= 0 then + Delete( Result ); end; function TList.ItemAddress(Idx: Integer): Pointer;