aboutsummaryrefslogtreecommitdiff
path: root/testsuite/bc_array.bc
blob: 3bb680178f74e46fad54b530fa95d9945398b86a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /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