help-bash
[Top][All Lists]
Advanced

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

[Help-bash] The data type of keys in array and associative array


From: Peng Yu
Subject: [Help-bash] The data type of keys in array and associative array
Date: Mon, 4 Mar 2019 17:13:56 -0600

Hi,

Since the key is always a string in the hash implementation, my
understanding is that the keys of both arrays and associative arrays
are actually strings, despite that it looks like integers for arrays.
Is it so? Thanks.

/* Create an entry for STRING, in TABLE.  If the entry already
   exists, then return it (unless the HASH_NOSRCH flag is set). */
BUCKET_CONTENTS *
hash_insert (string, table, flags)
     char *string;
     HASH_TABLE *table;
     int flags;

      item->key = string;


-- 
Regards,
Peng



reply via email to

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