Should variables automatically created within arithmetic constructs have the integer flag implied?

unset x; ((x = 42)); typeset -p x

> declare -- x="42"

Should it be:
declare -i x="42"


Here are cases where that would make a difference:

unset x; ((x = 42)); x+=624; typeset -p x

> declare -- x="42624"

unset x; declare -i x; ((x = 42)); x+=624; typeset -p x

> declare -i x="666"

--
Léa Gris


Reply via email to