busybox/testsuite/bc_misc1.bc
Denys Vlasenko 96b5ec10fb bc: fix "...; return}" to work, disallow "return ()"
function                                             old     new   delta
zbc_parse_expr                                        24    1865   +1841
zbc_parse_stmt_possibly_auto                        1425    1413     -12
bc_parse_expr_empty_ok                              1843       -   -1843
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/1 up/down: 1841/-1855)        Total: -14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-01-03 23:34:36 +01:00

75 lines
604 B
Plaintext

define x(x) {
return(x)
}
define y() {
return;
}
define z() {return}
scale = 0
x=2
x[0]=3
x
x[0]
scale
ibase
obase
x ( 7 )
x + x( 8 )
x - x[0]
321 * x
2 ^ x[0]
x++
--x
x += 9
x
length(2381)
sqrt(9)
scale(238.1)
x=2
x[0]=3
(x)
(x[0])
(scale)
(ibase)
(obase)
(x ( 7 ))
(x + x( 8 ))
(x - x[0])
(321 * x)
(2 ^ x[0])
(x++)
(--x)
(x += 9)
(length(2381))
(sqrt(9))
(scale(238.1))
(scale = 0)
(x = 10)
(x += 100)
(x -= 10)
(x *= 10)
(x /= 100)
(x ^= 10)
(x = sqrt(x))
(x[1 - 1])
x[(1 - 1)]
2 + \
3
++ibase
--ibase
++obase
--obase
++last
--last
last
last = 100
last
. = 150
.
++scale
--scale
y()
z()
2 + /*
*/3