bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extract hash for stand-alone use


From: arnold
Subject: Re: extract hash for stand-alone use
Date: Thu, 20 May 2021 11:09:41 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Peng Yu <pengyu.ut@gmail.com> wrote:

> I meant the hash table implementation for associative arrays instead of
> the hash function for associative arrays.
>
> Do you have a standalone example for the hash table (with insert,
> delete, get, length operations)? Sorry for the confusion.

The implementation in gawk is tailored to gawk's internal data structures.
It cannot be copy / pasted into a general purpose (standalone) hash
table implementation. Or, at least not without a certain amount of work.

What you're looking for should be findable in any standard "Algorithms
and Data Structures using C" sort of text book, and undoubtedly there
are also myriad articles on the Web, likely with source code.

Putting "hash table implementation in C" into Google brings up
numerous links that look useful and applicable.  Have at it.

Good luck,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]