BEGIN { Missing="?" Inf = 10^32 } function resetSeed() { srand(Seed ? Seed : 1) } function round(x) { return int(x+0.5) } function jiggle(n) { return 100*n + rand() } function def(x, y) { return x ? x : y } # show an array of strings function s(a, str, i,com) { com = "sort #" rand(); for(i in a) print i " = " a[i] | com close(com) } # show an array of numbers function o(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(); for(i in a) printf(show " : %s[ %s ]\n", a[i], str, i) | com; close(com); }