aboutsummaryrefslogtreecommitdiffstats
path: root/test/aryprm8.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 13:22:00 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 13:22:00 +0300
commit6cc7d587a710606d3fe52222707739c7cc1b8651 (patch)
tree2b6360852d8f966bd83eeb6efd8af90f8e9b83f9 /test/aryprm8.awk
parente888f1834b88270590b7e04d64c03c75863e4565 (diff)
downloadegawk-6cc7d587a710606d3fe52222707739c7cc1b8651.tar.gz
egawk-6cc7d587a710606d3fe52222707739c7cc1b8651.tar.bz2
egawk-6cc7d587a710606d3fe52222707739c7cc1b8651.zip
Move to gawk-3.1.3.
Diffstat (limited to 'test/aryprm8.awk')
-rw-r--r--test/aryprm8.awk22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/aryprm8.awk b/test/aryprm8.awk
new file mode 100644
index 00000000..b294abb6
--- /dev/null
+++ b/test/aryprm8.awk
@@ -0,0 +1,22 @@
+BEGIN {
+ f(0, a) # nothing
+ f(1, a)
+}
+function f(i, a) {
+ if (i == 0) return
+ g(a, a)
+ pr(a)
+}
+function g(x, y) {
+ h(y, x, y)
+}
+function h(b, c, d) {
+ b[1] = 1
+ c[1] = 2 # rewrite
+ print b[1], d[1]
+ c[2] = 1
+ b[2] = 2 # should rewrite
+}
+function pr(x) {
+ print x[1], x[2]
+}