summaryrefslogtreecommitdiffstats
path: root/contrib/awk/test/arrayref.awk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk/test/arrayref.awk')
-rw-r--r--contrib/awk/test/arrayref.awk13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/awk/test/arrayref.awk b/contrib/awk/test/arrayref.awk
new file mode 100644
index 0000000..144d41a
--- /dev/null
+++ b/contrib/awk/test/arrayref.awk
@@ -0,0 +1,13 @@
+ BEGIN { # foo[10] = 0 # put this line in and it will work
+ test(foo); print foo[1]
+ test2(foo2); print foo2[1]
+ }
+
+ function test(foo)
+ {
+ test2(foo)
+ }
+ function test2(bar)
+ {
+ bar[1] = 1
+ }
OpenPOWER on IntegriCloud