[Overview][Constants][Types][Classes][Index] Reference for unit 'DynHashArray' (#lcl)

TDynHashArray.Remove

Removes an element from the set/hash array

Declaration

Source position: dynhasharray.pp line 108

public procedure TDynHashArray.Remove(

  Item: Pointer

);

Description

An example:

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
 cthreads,
  {$ENDIF}{$ENDIF}
  Classes, dynhasharray,strings;

var
  A:TDynHashArray;
  s:pchar;
  s2:pchar;
begin
A:=TDynHashArray.Create;
s:=StrNew ('u');
s2:=StrNew ('i');
A.Add(s);
A.Add(s2);
if A.Contains(s2) then
  writeln('1:it contains s2.');
  writeln('1:count:',A.Count);
A.Remove(s2);
if A.Contains(s2) then
  writeln('2:it contains s2.');
  writeln('2:count:',A.Count);
ReadLn;
StrDispose(s);StrDispose(s2);
end.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.