bug-bash
[Top][All Lists]
Advanced

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

Re: declare -ia does not enfore integer type on initialisation


From: Peggy Russell
Subject: Re: declare -ia does not enfore integer type on initialisation
Date: Wed, 5 Feb 2014 22:25:59 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> > 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




reply via email to

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