[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
- Bash arithmetic doesn't give error message on wrap., Richard Neill, 2007/04/27
- Re: Bash arithmetic doesn't give error message on wrap., Chet Ramey, 2007/04/28
- Re: Bash arithmetic doesn't give error message on wrap., Richard Neill, 2007/04/28
- Re: Bash arithmetic doesn't give error message on wrap.,
Bob Proulx <=
- Re: Bash arithmetic doesn't give error message on wrap., Richard Neill, 2007/04/29
- Re: Bash arithmetic doesn't give error message on wrap., Andreas Schwab, 2007/04/30
- Re: Bash arithmetic doesn't give error message on wrap., Bob Proulx, 2007/04/30
- Re: Bash arithmetic doesn't give error message on wrap., Richard Neill, 2007/04/30
- Re: Bash arithmetic doesn't give error message on wrap., Paul Jarc, 2007/04/30
- Re: Bash arithmetic doesn't give error message on wrap., Andreas Schwab, 2007/04/30
- Re: Bash arithmetic doesn't give error message on wrap., Paul Jarc, 2007/04/30
- Re: Bash arithmetic doesn't give error message on wrap., Paul Jarc, 2007/04/30