function def(x,y) { return x ? x : y } function s2a(s,a, sep, n,tmp,i,j) { sep = def(sep, SUBSEP) n=split(s,tmp,sep) for(i=1;i<=n;i += 2) { j++ a[tmp[i]] = tmp[i+1] } return j } function p(a, str, i) { for(i in a) print str "["i"] = " a[i] } function n(a, str,order,show, i,com) { str = def(str, "a"); order = def(order,"-n -k 1"); show = def(show, "%10.3f"); com = "sort " order " #" rand(); print ""; for(i in a) printf(show ": %s[ %s ]\n", a[i], str, i) | com; close(com); } function o(a, str,order,show, i,com) { str = def(str, "a"); order = def(order," -k 1"); show = def(show, "%10s"); com = "sort " order " #" rand(); print ""; for(i in a) printf("%s[ "show " ]: %s \n", str,i,a[i] ) | com; close(com); }