diff options
author | andreas <andreas@FreeBSD.org> | 1998-04-29 21:53:01 +0000 |
---|---|---|
committer | andreas <andreas@FreeBSD.org> | 1998-04-29 21:53:01 +0000 |
commit | 0ec6169bea8adb8ddbf8f9ce363f6e1803f88621 (patch) | |
tree | 1529c15b522fa7bd199b5491bc88817aefc9b779 /contrib/bc/Test/array.b | |
download | FreeBSD-src-0ec6169bea8adb8ddbf8f9ce363f6e1803f88621.zip FreeBSD-src-0ec6169bea8adb8ddbf8f9ce363f6e1803f88621.tar.gz |
Import GNU bc 1.04
PR: 4183
Diffstat (limited to 'contrib/bc/Test/array.b')
-rw-r--r-- | contrib/bc/Test/array.b | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/bc/Test/array.b b/contrib/bc/Test/array.b new file mode 100644 index 0000000..a0341ec --- /dev/null +++ b/contrib/bc/Test/array.b @@ -0,0 +1,14 @@ +"This tests arrays! +" +define p(x,y) { + auto i; + for (i=x; i<y; i++) a[i]; +} + +for (i=0; i<10; i++) a[i] = i; +j = p(0,10); + +for (i=1000; i<1030; i++) a[i] = i; +j = p(1000,1030); +j = p(0,10); + |