summaryrefslogtreecommitdiffstats
path: root/contrib/bc/Test/array.b
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bc/Test/array.b')
-rw-r--r--contrib/bc/Test/array.b14
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);
+
OpenPOWER on IntegriCloud