Sample Header Ad - 728x90

By default, bc interprets any alpha character as a 9

3 votes
1 answer
352 views
**System**: - Ubuntu 22.04.3 LTS - GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) - bc 1.07.1 **Observation**: Both ibase and obase are unset. echo "A0" | bc 90 echo "B0" | bc 90 echo "X0" | bc 90 **Question**: Why does bc interpret alpha characters as 9s by default? Why wouldn't an error message be preferable here?
Asked by yossi-matkal (193 rep)
Mar 23, 2024, 04:04 PM
Last activity: Mar 23, 2024, 06:33 PM