ndk-busybox/testsuite/bc_array.bc
Denys Vlasenko 9a23b07c4c testsuite: add bc and dc tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-12-12 21:41:40 +01:00

36 lines
283 B
Plaintext

#! /usr/bin/bc -q
define z(a[]) {
for (i = 0; i < l; ++i) {
a[i]
}
}
define x(a[]) {
for (i = 0; i < l; ++i) {
a[i] = -i
}
z(a[])
}
for (i = 0; i < 101; ++i) {
a[i] = i
}
a[104] = 204
l = length(a[])
for (i = 0; i <= l; ++i) {
a[i]
}
z(a[])
x(a[])
z(a[])
l
halt