[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$((expr)) allows the hexadecimal constant "0x"
From: |
Denys Vlasenko |
Subject: |
$((expr)) allows the hexadecimal constant "0x" |
Date: |
Thu, 29 Jun 2023 11:45:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
Good day.
IIRC bash used to allow numeric constants of the
BASE#DIGITS form even if the DIGITS part was empty.
IOW: not only "64#0", but "64#" too was accepted
as a valid zero constant.
This no longer works in 5.2.15, probably better than
former behavior, "64#" looked quite confusing.
However, a somewhat similar situation with hex prefix,
0xDIGITS, still allows just "0x" as a valid zero constant.
Not sure whether this should be considered a bug,
and whether it's worth fixing - just letting you know.
- $((expr)) allows the hexadecimal constant "0x",
Denys Vlasenko <=