The fine man page, bash(1), says

    ((expression))
        The expression is evaluated according to the rules described 
        below under ARITHMETIC EVALUATION.  If the value of the
        expression is non-zero, the return status is 0; otherwise the 
        return status is 1.  This is exactly equivalent to let
        "expression".

IOW, the behaviour you're seeing is correct.

** Changed in: bash (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/536129

Title:
  ++ operator exits with error when the variable equals to zero

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to