[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
arithmetic evaluation (may be error) ?
From: |
Roman Rumisek |
Subject: |
arithmetic evaluation (may be error) ? |
Date: |
Sat, 29 Dec 2007 17:43:46 +0100 |
User-agent: |
KNode/0.10.5 |
Hi,
I am using bash: BASH_VERSION='3.2.17(2)-release'
and i test arithmetic evaluation with this results:
$ echo $((296 & 4))
0
$ echo $((4 & 4))
4
$ echo $((04 & 4))
4
$ echo $((004 & 4))
4
$ echo $((0004 & 4))
4
$ echo $(("096" & 4))
bash: "096" & 4: syntax error: operand expected (error token is ""096" & 4")
$ echo $((0096 & 4))
bash: 0096: value too great for base (error token is "0096")
$ echo $((0012 & 4))
0
$ echo $((0016 & 4))
4
Is it bash error ?
Roman
- arithmetic evaluation (may be error) ?,
Roman Rumisek <=