[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
need ability to tell if array is associative or not - bug?
From: |
Jason Vas Dias |
Subject: |
need ability to tell if array is associative or not - bug? |
Date: |
Fri, 29 Aug 2014 15:07:40 +0100 |
Good day list -
There seems to be no way of testing if an array variable is associative or not ,
yet attempting to make associative assigments to a normal array results in a
syntax error .
I have something like:
declare -xr TYPE_ARRAY=0 TYPE_ASSOC=1
function f()
{ declare -n an_array=$1;
local type=$2;
case $type in
$TYPE_ASSOC)
an_array['some_value']=1;
}
- need ability to tell if array is associative or not - bug?,
Jason Vas Dias <=