xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/arynasty.awk (revision e6d6c189fa3a95d7aa27bbe0aeacf7c1a6b57c8c)
1*e6d6c189SCody Peter MelloBEGIN {
2*e6d6c189SCody Peter Mello	a = 12.153
3*e6d6c189SCody Peter Mello#print "-- stroring test[a]" > "/dev/stderr" ; fflush("/dev/stderr")
4*e6d6c189SCody Peter Mello	test[a] = "hi"
5*e6d6c189SCody Peter Mello#print "-- setting CONVFMT" > "/dev/stderr" ; fflush("/dev/stderr")
6*e6d6c189SCody Peter Mello	CONVFMT = "%.0f"
7*e6d6c189SCody Peter Mello#print "-- setting a" > "/dev/stderr" ; fflush("/dev/stderr")
8*e6d6c189SCody Peter Mello	a = 5
9*e6d6c189SCody Peter Mello#stopme()
10*e6d6c189SCody Peter Mello#print "-- starting loop" > "/dev/stderr" ; fflush("/dev/stderr")
11*e6d6c189SCody Peter Mello	for (i in test) {
12*e6d6c189SCody Peter Mello#print("-- i =", i) > "/dev/stderr" ; fflush("/dev/stderr");
13*e6d6c189SCody Peter Mello#printf("-- i = <%s>\n", i) > "/dev/stderr" ; fflush("/dev/stderr");
14*e6d6c189SCody Peter Mello		printf ("test[%s] = %s\n", i, test[i])
15*e6d6c189SCody Peter Mello	}
16*e6d6c189SCody Peter Mello}
17