help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] declare -i


From: Bill Gradwohl
Subject: Re: [Help-bash] declare -i
Date: Tue, 8 May 2012 22:07:47 -0600

On Tue, May 8, 2012 at 10:03 PM, Dan Douglas <address@hidden> wrote:
INTERNALLY? I believe they are stored in exactly the same way as any other
variable, they just get the -i attribute added as metadata. The ksh88 manpage
states that -i may be faster, but I believe in Bash it's actually slightly
slower, which makes sense because now all assignments are subject to an extra
evaluation step, and operators are modified such as the behavior of += in
several places.

Using -i can be an easy source of bugs and security problems, and adds a lot
of
quirks especially with arrays.

-- Dan Douglas

Many thanks.


--
Bill Gradwohl


reply via email to

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