summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/bc/Test/array.b
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
commitd6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch)
treeece253b876159b39c620e62b6c9b1174642e070e /gnu/usr.bin/bc/Test/array.b
initial import of NetBSD tree
Diffstat (limited to 'gnu/usr.bin/bc/Test/array.b')
-rw-r--r--gnu/usr.bin/bc/Test/array.b14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/usr.bin/bc/Test/array.b b/gnu/usr.bin/bc/Test/array.b
new file mode 100644
index 00000000000..a0341ec7d74
--- /dev/null
+++ b/gnu/usr.bin/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);
+