bug-bash
[Top][All Lists]
Advanced

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

Re: Bash arithmetic doesn't give error message on wrap.


From: Bob Proulx
Subject: Re: Bash arithmetic doesn't give error message on wrap.
Date: Sun, 29 Apr 2007 07:41:16 -0600
User-agent: Mutt/1.5.9i

Richard Neill wrote:
>  b)Consistent with other cases, where bash does give warnings. For example:
> 
> $ X=$((3+078))
> bash: 3+078: value too great for base (error token is "078")
> $ echo $?
> 1

That is not really a comparable case.  The problem there is that the
leading zero specifies an octal constant and the 8 cannot be converted
to octal.  The "3+" part is just a distraction.

  echo $((08))
  bash: 08: value too great for base (error token is "08")

Bob




reply via email to

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