Re: [Help-bash] Can `declare -i` increase the performance of integer ari
From:
Chet Ramey
Subject:
Re: [Help-bash] Can `declare -i` increase the performance of integer arithmetic?
Date:
Thu, 8 Feb 2018 11:27:21 -0500
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
On 2/8/18 11:26 AM, Peng Yu wrote:
> Is a variable always stored as a string whether `declare -i` is used?
Yes.
> It sounds like if `declare -i` is used on a variable, it is content
> should be saved as an integer instead of a string as it is likely that
> subsequent arithmetic operations will be performed on the variable. Is
> it?
No.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/