awkposix

What's new in POSIX Awk 2024?


A while ago I stumbled upon the POSIX 2024 (issue 8) specification, and today I'm trying to figure out the differences between Awk 2018 (issue 7) and Awk 2024 (issue 8).
For eg. I found out that nextfile is now mandated by POSIX!

Are there any other changes worth mentioning?


Solution

  • After painstakingly reading both specifications in // to determine the differences, I found out it was pointless labor as there's a CHANGE HISTORY section at the end the document...
    Excluding the "clarifications", here's what's changed:

    Issue 8

    Austin Group Defect 251 is applied, encouraging implementations to disallow the creation of filenames containing any bytes that have the encoded value of a newline character.

    Austin Group Defects 544 and 1136 are applied, requiring implementations to accept the delete statement with an unsubscripted array name.

    Austin Group Defect 607 is applied, adding the nextfile statement.

    Austin Group Defect 634 is applied, adding the fflush function.

    Austin Group Defect 983 is applied, changing the descriptions of the rand and srand functions and the FUTURE DIRECTIONS section.

    Austin Group Defect 1070 is applied, requiring the "!=" and "==" operators to perform string comparisons by checking if the strings are identical (and not by checking if they collate equally).

    Austin Group Defect 1122 is applied, changing the description of NLSPATH .

    Austin Group Defect 1198 is applied, requiring comparisons to be performed numerically when both operands have string values that are numeric strings.

    Austin Group Defect 1395 is applied, changing the requirements for string to number conversion.

    Austin Group Defect 1566 is applied, specifying the behavior of the length function when passed an array argument.