bc: more fixes for unusual input bases

function                                             old     new   delta
zxc_program_num                                      990    1020     +30
zxc_lex_number                                       172     202     +30
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 60/0)               Total: 60 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-12-29 02:40:03 +01:00
parent e16a5223d2
commit d5b0fa6abf
3 changed files with 82 additions and 7 deletions

18
testsuite/bc_numbers2.bc Normal file
View File

@@ -0,0 +1,18 @@
define f() {
"ibase:";ibase
a=A;a
a=F;a
a=G;a
a=Z;a
a=0A;a
a=0F;a
a=0G;a
a=0Z;a
}
f()
ibase=9;f()
ibase=A;f()
ibase=F;f()
ibase=G;f()
#ibase=Z;f()
halt

View File

@@ -0,0 +1,50 @@
ibase:10
10
15
16
35
10
15
16
35
0
ibase:9
10
15
16
35
10
15
16
35
0
ibase:10
10
15
16
35
10
15
16
35
0
ibase:15
10
15
16
35
10
15
16
35
0
ibase:16
10
15
16
35
10
15
16
35
0