[fpc-pascal] TFPDataHashTable
Michael Van Canneyt
michael at freepascal.org
Fri Jun 10 22:10:57 CEST 2011
On Fri, 10 Jun 2011, Joseph Montanez wrote:
> I am tring to understand how to use TFPDataHashTable and upon using it
> I just manage to crash the application.
>
> program hashdemo;
>
> uses contnrs;
>
> var
> HTable: TFPDataHashTable;
> Test: String;
> node: THTCustomNode;
> begin
> Test := 'terr';
> HTable.create;
This should be
HTable:=TFPDataHashTable.Create;
They are classes, not objects.
> HTable.add('test', @Test); { <-- Crashes here because its not initialised? }
> writeln('Hello!');
> node := HTable.find('test');
> writeln(node.Key);
> end.
>
>
>
>
> --
> Joseph Montanez
> Web Developer
> Gorilla3D
> Design, Develop, Deploy
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list