> > Description: > > declare -ia not enforced if variable is initiated using = > > Correct; bash applies the integer attribute after the variable assignment. > It has been this way since arrays were introduced (well, at least as far > back as bash-3.2; that's when I stopped looking).
Perhaps documenting the behavior would be helpful. Maybe the last sentence to the declare help could say, "Attributes added with -a or -A do not take effect until subsequent assignments." Peggy Russell