Hide Forgot
Description of problem: Section 11.2.1.2 describes a method of controlling the order in which the index values will be returned by the "for (index in array)" statement. Using the example in the info file throws a load error that the function is not found. Version-Release number of selected component (if applicable): 4.0.0 How reproducible: Every time Steps to Reproduce: 1. Write a program using the PROCINFO["sorted_in"]="str_ind_asc" statement 2. Attempt to run it 3. Actual results: $ gawk 'BEGIN {PROCINFO["sorted_in"]="@str_ind_asc";a[1]=1;a[2]=-1;for (i in a) print a[i]}' gawk: cmd. line:1: fatal: sort comparison function `@str_ind_asc' is not defined Expected results: Successful run Additional info: Creating my own function, per 11.2.1.1, works with no problem.
Hello, first: sorry for answering your report this late. The "problem" here is in the fact there was a typo in the documentation of that function. It is spelled "ind_str_asc". It is now fixed even in the docs: http://www.gnu.org/software/gawk/manual/html_node/Controlling-Scanning . Thank you for reporting, I'm closing this for now. But feel free to reopen if needed.