|
| From: | Léa Gris |
| Subject: | Variables declared in arithmetic expressions have no i flag |
| Date: | Tue, 24 Nov 2020 14:30:36 +0100 |
| User-agent: | Telnet/1.0 [tlh] (PDP11/DEC) |
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
| [Prev in Thread] | Current Thread | [Next in Thread] |