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:
18
testsuite/bc_numbers2.bc
Normal file
18
testsuite/bc_numbers2.bc
Normal 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
|
50
testsuite/bc_numbers2_results.txt
Normal file
50
testsuite/bc_numbers2_results.txt
Normal 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
|
Reference in New Issue
Block a user