projects
/
dragonfly.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
The first a bug in pax and should be commited to FBSD, too.
[dragonfly.git]
/
contrib
/
bc
/
Test
/
arrayp.b
1
"This tests arrays!
2
"
3
define p(a[],x,y) {
4
auto i;
5
for (i=x; i<y; i++) a[i];
6
}
7
8
define m(a[],x,y) {
9
auto i;
10
for (i=x; i<y; i++) a[i] = i;
11
}
12
13
define m1(*a[],x,y) {
14
auto i;
15
print "m1\n"
16
for (i=x; i<y; i++) a[i] = i;
17
}
18
19
for (i=0; i<10; i++) a[i] = i;
20
j = p(a[],0,10);
21
22
j = m(b[],0,10);
23
j = p(b[],0,10);
24
25
print "---\n";
26
j = m1(b[],0,10);
27
j = p(b[],0,10);
28
29
quit
30