[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
declare -ia does not enfore integer type on initialisation
From: |
phil colbourn |
Subject: |
declare -ia does not enfore integer type on initialisation |
Date: |
Wed, 5 Feb 2014 09:17:07 +1100 |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib
-D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security -Wall
uname output: Linux max 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59
UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 4.2
Patch Level: 45
Release Status: release
Description:
declare -ia not enforced if variable is initiated using =
Repeat-By:
unset Z; declare -ia Z=( A B C ); echo ${Z[*]}; Z=( D E F ); echo ${Z[*]}
Outputs
A B C
0 0 0
Should output:
0 0 0
0 0 0
Phil
- declare -ia does not enfore integer type on initialisation,
phil colbourn <=