Home Mail an Joachim Pimiskern Impressum

TJpHashTable - a hashtable for Object Pascal

Last update Mar 18 2005

TJpHashTable is a Borland Object Pascal / Delphi class for hashtables.

A hashtable maps a string to another string. The first one is called the key, the second one the value. Hashtables are also called associative arrays.

Status: Freeware; modify and use it at your own risk. I'd be glad if you left a comment in the source file about the original author, Joachim Pimiskern.

Download

Example

uses
  jphash;

procedure TForm1.Button1Click(Sender: TObject);
var h: TJpHashtable;
begin
  h := TJpHashtable.Create;
  try
    h.Add('one'  ,'1');
    h.Add('two'  ,'2');
    h.Add('three','3');
    h.Add('four' ,'4');
    h.Add('five' ,'5');
    Showmessage(h.get('three'));
  finally
    h.Free;
  end;
end;
   

Home Mail an Joachim Pimiskern Impressum