summaryrefslogtreecommitdiff
path: root/test/arryref2.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/arryref2.awk')
-rw-r--r--test/arryref2.awk18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/arryref2.awk b/test/arryref2.awk
new file mode 100644
index 0000000..202a040
--- /dev/null
+++ b/test/arryref2.awk
@@ -0,0 +1,18 @@
+BEGIN {
+ foo(a)
+
+ for (i in a)
+ print i, a[i]
+}
+
+function foo(b)
+{
+ bar(b)
+ b[2] = "local"
+}
+
+function bar(c)
+{
+ a[3] = "global"
+ c[1] = "local2"
+}