diff options
-rw-r--r-- | doc/ChangeLog | 9 | ||||
-rw-r--r-- | doc/gawk.info | 662 | ||||
-rw-r--r-- | doc/gawk.texi | 28 | ||||
-rw-r--r-- | doc/gawktexi.in | 28 |
4 files changed, 394 insertions, 333 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 1e406590..37a28ac0 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,6 +1,13 @@ +2022-02-07 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Indirect Calls): Expand discussion of calling + built-in functions directly. + (POSIX Floating Point Problems): Add a note that the sign of + NaN values can vary. + 2022-01-05 Arnold D. Robbins <arnold@skeeve.com> - * gawktexi.ini (Indirect Calls): Use `the_function' everywhere. + * gawktexi.in (Indirect Calls): Use `the_function' everywhere. Thanks to John Naman, <gawker@703n.com> for the report. 2021-12-10 Arnold D. Robbins <arnold@skeeve.com> diff --git a/doc/gawk.info b/doc/gawk.info index 664627c6..0f00b0c3 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -15552,14 +15552,27 @@ Dynamic Extensions::). There are some limitations when calling built-in functions indirectly, as follows. * You cannot pass a regular expression constant to a built-in - function through an indirect function call.(1) This applies to the + function through an indirect function call. This applies to the 'sub()', 'gsub()', 'gensub()', 'match()', 'split()' and - 'patsplit()' functions. + 'patsplit()' functions. However, you can pass a strongly typed + regexp constant (*note Strong Regexp Constants::). * If calling 'sub()' or 'gsub()', you may only pass two arguments, since those functions are unusual in that they update their third argument. This means that '$0' will be updated. + * You cannot indirectly call built-in functions that can take '$0' as + a default parameter; you must supply an argument instead. For + example, you must pass an argument to 'length()' if calling it + indirectly. + + * Calling a built-in function indirectly with the wrong number of + arguments for that function causes a fatal error. For example, + calling 'length()' with two arguments. These errors are found at + runtime instead of when 'gawk' parses your program, since 'gawk' + doesn't know until runtime if you have passed the correct number of + arguments or not. + 'gawk' does its best to make indirect function calls efficient. For example, in the following case: @@ -15568,11 +15581,6 @@ example, in the following case: 'gawk' looks up the actual function to call only once. - ---------- Footnotes ---------- - - (1) This may change in a future version; recheck the documentation -that comes with your version of 'gawk' to see if it has. - File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions @@ -25162,6 +25170,13 @@ described: '+inf', '-inf', '+nan', or '-nan'. Similarly, in POSIX mode, 'gawk' prints the result of the system's C 'printf()' function using the '%g' format string for the value, whatever that may be. + NOTE: The sign used for NaN values can vary! The result depends + upon both the underlying system architecture and the underlying + library used to format NaN values. In particular, it's possible to + get different results for the same function call depending upon + whether or not 'gawk' is running in MPFR mode ('-M') or not. + Caveat Emptor! + ---------- Footnotes ---------- (1) You asked for it, you got it. @@ -38885,323 +38900,322 @@ Ref: Function Caveats-Footnote-1636441 Node: Return Statement636561 Node: Dynamic Typing639540 Node: Indirect Calls640470 -Ref: Indirect Calls-Footnote-1650734 -Node: Functions Summary650862 -Node: Library Functions653567 -Ref: Library Functions-Footnote-1657174 -Ref: Library Functions-Footnote-2657317 -Node: Library Names657488 -Ref: Library Names-Footnote-1661155 -Ref: Library Names-Footnote-2661378 -Node: General Functions661464 -Node: Strtonum Function662646 -Node: Assert Function665668 -Node: Round Function668994 -Node: Cliff Random Function670534 -Node: Ordinal Functions671550 -Ref: Ordinal Functions-Footnote-1674613 -Ref: Ordinal Functions-Footnote-2674865 -Node: Join Function675075 -Ref: Join Function-Footnote-1676845 -Node: Getlocaltime Function677045 -Node: Readfile Function680787 -Node: Shell Quoting682764 -Node: Isnumeric Function684192 -Node: Data File Management685580 -Node: Filetrans Function686212 -Node: Rewind Function690308 -Node: File Checking692217 -Ref: File Checking-Footnote-1693551 -Node: Empty Files693752 -Node: Ignoring Assigns695731 -Node: Getopt Function697281 -Ref: Getopt Function-Footnote-1712578 -Node: Passwd Functions712778 -Ref: Passwd Functions-Footnote-1721617 -Node: Group Functions721705 -Ref: Group Functions-Footnote-1729603 -Node: Walking Arrays729810 -Node: Library Functions Summary732818 -Node: Library Exercises734224 -Node: Sample Programs734689 -Node: Running Examples735459 -Node: Clones736187 -Node: Cut Program737411 -Node: Egrep Program747551 -Node: Id Program756552 -Node: Split Program766487 -Ref: Split Program-Footnote-1776380 -Node: Tee Program776553 -Node: Uniq Program779343 -Node: Wc Program786931 -Node: Bytes vs. Characters787318 -Node: Using extensions788866 -Node: wc program789620 -Node: Miscellaneous Programs794485 -Node: Dupword Program795698 -Node: Alarm Program797728 -Node: Translate Program802583 -Ref: Translate Program-Footnote-1807148 -Node: Labels Program807418 -Ref: Labels Program-Footnote-1810769 -Node: Word Sorting810853 -Node: History Sorting814925 -Node: Extract Program817150 -Node: Simple Sed825163 -Node: Igawk Program828237 -Ref: Igawk Program-Footnote-1842568 -Ref: Igawk Program-Footnote-2842770 -Ref: Igawk Program-Footnote-3842892 -Node: Anagram Program843007 -Node: Signature Program846069 -Node: Programs Summary847316 -Node: Programs Exercises848530 -Ref: Programs Exercises-Footnote-1852660 -Node: Advanced Features852746 -Node: Nondecimal Data854813 -Node: Array Sorting856404 -Node: Controlling Array Traversal857104 -Ref: Controlling Array Traversal-Footnote-1865472 -Node: Array Sorting Functions865590 -Ref: Array Sorting Functions-Footnote-1870964 -Node: Two-way I/O871160 -Ref: Two-way I/O-Footnote-1878886 -Ref: Two-way I/O-Footnote-2879073 -Node: TCP/IP Networking879155 -Node: Profiling882231 -Node: Extension Philosophy891540 -Node: Advanced Features Summary893019 -Node: Internationalization895034 -Node: I18N and L10N896708 -Node: Explaining gettext897395 -Ref: Explaining gettext-Footnote-1903287 -Ref: Explaining gettext-Footnote-2903472 -Node: Programmer i18n903637 -Ref: Programmer i18n-Footnote-1908586 -Node: Translator i18n908635 -Node: String Extraction909429 -Ref: String Extraction-Footnote-1910561 -Node: Printf Ordering910647 -Ref: Printf Ordering-Footnote-1913433 -Node: I18N Portability913497 -Ref: I18N Portability-Footnote-1915953 -Node: I18N Example916016 -Ref: I18N Example-Footnote-1919291 -Ref: I18N Example-Footnote-2919364 -Node: Gawk I18N919473 -Node: I18N Summary920095 -Node: Debugger921436 -Node: Debugging922436 -Node: Debugging Concepts922877 -Node: Debugging Terms924686 -Node: Awk Debugging927261 -Ref: Awk Debugging-Footnote-1928206 -Node: Sample Debugging Session928338 -Node: Debugger Invocation928872 -Node: Finding The Bug930258 -Node: List of Debugger Commands936732 -Node: Breakpoint Control938065 -Node: Debugger Execution Control941759 -Node: Viewing And Changing Data945121 -Node: Execution Stack948662 -Node: Debugger Info950299 -Node: Miscellaneous Debugger Commands954370 -Node: Readline Support959432 -Node: Limitations960328 -Node: Debugging Summary962882 -Node: Namespaces964161 -Node: Global Namespace965272 -Node: Qualified Names966670 -Node: Default Namespace967669 -Node: Changing The Namespace968410 -Node: Naming Rules970024 -Node: Internal Name Management971872 -Node: Namespace Example972914 -Node: Namespace And Features975476 -Node: Namespace Summary976911 -Node: Arbitrary Precision Arithmetic978388 -Node: Computer Arithmetic979875 -Ref: table-numeric-ranges983641 -Ref: table-floating-point-ranges984135 -Ref: Computer Arithmetic-Footnote-1984794 -Node: Math Definitions984851 -Ref: table-ieee-formats988167 -Ref: Math Definitions-Footnote-1988771 -Node: MPFR features988876 -Node: FP Math Caution990594 -Ref: FP Math Caution-Footnote-1991666 -Node: Inexactness of computations992035 -Node: Inexact representation992995 -Node: Comparing FP Values994355 -Node: Errors accumulate995596 -Node: Getting Accuracy997029 -Node: Try To Round999739 -Node: Setting precision1000638 -Ref: table-predefined-precision-strings1001335 -Node: Setting the rounding mode1003166 -Ref: table-gawk-rounding-modes1003540 -Ref: Setting the rounding mode-Footnote-11007472 -Node: Arbitrary Precision Integers1007651 -Ref: Arbitrary Precision Integers-Footnote-11010826 -Node: Checking for MPFR1010975 -Node: POSIX Floating Point Problems1012449 -Ref: POSIX Floating Point Problems-Footnote-11016734 -Node: Floating point summary1016772 -Node: Dynamic Extensions1018962 -Node: Extension Intro1020515 -Node: Plugin License1021781 -Node: Extension Mechanism Outline1022578 -Ref: figure-load-extension1023017 -Ref: figure-register-new-function1024583 -Ref: figure-call-new-function1025676 -Node: Extension API Description1027739 -Node: Extension API Functions Introduction1029452 -Ref: table-api-std-headers1031288 -Node: General Data Types1035538 -Ref: General Data Types-Footnote-11044168 -Node: Memory Allocation Functions1044467 -Ref: Memory Allocation Functions-Footnote-11048968 -Node: Constructor Functions1049067 -Node: API Ownership of MPFR and GMP Values1052533 -Node: Registration Functions1053846 -Node: Extension Functions1054546 -Node: Exit Callback Functions1059868 -Node: Extension Version String1061118 -Node: Input Parsers1061781 -Node: Output Wrappers1074502 -Node: Two-way processors1079014 -Node: Printing Messages1081279 -Ref: Printing Messages-Footnote-11082450 -Node: Updating ERRNO1082603 -Node: Requesting Values1083342 -Ref: table-value-types-returned1084079 -Node: Accessing Parameters1085016 -Node: Symbol Table Access1086253 -Node: Symbol table by name1086765 -Ref: Symbol table by name-Footnote-11089790 -Node: Symbol table by cookie1089918 -Ref: Symbol table by cookie-Footnote-11094103 -Node: Cached values1094167 -Ref: Cached values-Footnote-11097703 -Node: Array Manipulation1097856 -Ref: Array Manipulation-Footnote-11098947 -Node: Array Data Types1098984 -Ref: Array Data Types-Footnote-11101642 -Node: Array Functions1101734 -Node: Flattening Arrays1106232 -Node: Creating Arrays1113208 -Node: Redirection API1117975 -Node: Extension API Variables1120808 -Node: Extension Versioning1121519 -Ref: gawk-api-version1121948 -Node: Extension GMP/MPFR Versioning1123680 -Node: Extension API Informational Variables1125308 -Node: Extension API Boilerplate1126381 -Node: Changes from API V11130355 -Node: Finding Extensions1131927 -Node: Extension Example1132486 -Node: Internal File Description1133284 -Node: Internal File Ops1137364 -Ref: Internal File Ops-Footnote-11148714 -Node: Using Internal File Ops1148854 -Ref: Using Internal File Ops-Footnote-11151237 -Node: Extension Samples1151511 -Node: Extension Sample File Functions1153040 -Node: Extension Sample Fnmatch1160689 -Node: Extension Sample Fork1162176 -Node: Extension Sample Inplace1163394 -Node: Extension Sample Ord1167020 -Node: Extension Sample Readdir1167856 -Ref: table-readdir-file-types1168745 -Node: Extension Sample Revout1169813 -Node: Extension Sample Rev2way1170402 -Node: Extension Sample Read write array1171142 -Node: Extension Sample Readfile1173084 -Node: Extension Sample Time1174179 -Node: Extension Sample API Tests1175931 -Node: gawkextlib1176423 -Node: Extension summary1179341 -Node: Extension Exercises1183043 -Node: Language History1184285 -Node: V7/SVR3.11185941 -Node: SVR41188093 -Node: POSIX1189527 -Node: BTL1190908 -Node: POSIX/GNU1191637 -Node: Feature History1197415 -Node: Common Extensions1214590 -Node: Ranges and Locales1215873 -Ref: Ranges and Locales-Footnote-11220489 -Ref: Ranges and Locales-Footnote-21220516 -Ref: Ranges and Locales-Footnote-31220751 -Node: Contributors1220974 -Node: History summary1226971 -Node: Installation1228351 -Node: Gawk Distribution1229295 -Node: Getting1229779 -Node: Extracting1230742 -Node: Distribution contents1232380 -Node: Unix Installation1239441 -Node: Quick Installation1240245 -Node: Compiling with MPFR1242665 -Node: Shell Startup Files1243355 -Node: Additional Configuration Options1244444 -Node: Configuration Philosophy1246759 -Node: Compiling from Git1249155 -Node: Building the Documentation1249710 -Node: Non-Unix Installation1251094 -Node: PC Installation1251554 -Node: PC Binary Installation1252392 -Node: PC Compiling1253265 -Node: PC Using1254382 -Node: Cygwin1257935 -Node: MSYS1259159 -Node: VMS Installation1259761 -Node: VMS Compilation1260480 -Ref: VMS Compilation-Footnote-11261709 -Node: VMS Dynamic Extensions1261767 -Node: VMS Installation Details1263452 -Node: VMS Running1265714 -Node: VMS GNV1269993 -Node: Bugs1270707 -Node: Bug definition1271619 -Node: Bug address1274555 -Node: Usenet1277943 -Node: Performance bugs1279132 -Node: Asking for help1282053 -Node: Maintainers1284020 -Node: Other Versions1285214 -Node: Installation summary1293378 -Node: Notes1294742 -Node: Compatibility Mode1295536 -Node: Additions1296318 -Node: Accessing The Source1297243 -Node: Adding Code1298680 -Node: New Ports1304872 -Node: Derived Files1309247 -Ref: Derived Files-Footnote-11314907 -Ref: Derived Files-Footnote-21314942 -Ref: Derived Files-Footnote-31315540 -Node: Future Extensions1315654 -Node: Implementation Limitations1316312 -Node: Extension Design1317522 -Node: Old Extension Problems1318666 -Ref: Old Extension Problems-Footnote-11320184 -Node: Extension New Mechanism Goals1320241 -Ref: Extension New Mechanism Goals-Footnote-11323605 -Node: Extension Other Design Decisions1323794 -Node: Extension Future Growth1325907 -Node: Notes summary1326513 -Node: Basic Concepts1327671 -Node: Basic High Level1328352 -Ref: figure-general-flow1328634 -Ref: figure-process-flow1329320 -Ref: Basic High Level-Footnote-11332622 -Node: Basic Data Typing1332807 -Node: Glossary1336135 -Node: Copying1368020 -Node: GNU Free Documentation License1405563 -Node: Index1430683 +Node: Functions Summary651394 +Node: Library Functions654099 +Ref: Library Functions-Footnote-1657706 +Ref: Library Functions-Footnote-2657849 +Node: Library Names658020 +Ref: Library Names-Footnote-1661687 +Ref: Library Names-Footnote-2661910 +Node: General Functions661996 +Node: Strtonum Function663178 +Node: Assert Function666200 +Node: Round Function669526 +Node: Cliff Random Function671066 +Node: Ordinal Functions672082 +Ref: Ordinal Functions-Footnote-1675145 +Ref: Ordinal Functions-Footnote-2675397 +Node: Join Function675607 +Ref: Join Function-Footnote-1677377 +Node: Getlocaltime Function677577 +Node: Readfile Function681319 +Node: Shell Quoting683296 +Node: Isnumeric Function684724 +Node: Data File Management686112 +Node: Filetrans Function686744 +Node: Rewind Function690840 +Node: File Checking692749 +Ref: File Checking-Footnote-1694083 +Node: Empty Files694284 +Node: Ignoring Assigns696263 +Node: Getopt Function697813 +Ref: Getopt Function-Footnote-1713110 +Node: Passwd Functions713310 +Ref: Passwd Functions-Footnote-1722149 +Node: Group Functions722237 +Ref: Group Functions-Footnote-1730135 +Node: Walking Arrays730342 +Node: Library Functions Summary733350 +Node: Library Exercises734756 +Node: Sample Programs735221 +Node: Running Examples735991 +Node: Clones736719 +Node: Cut Program737943 +Node: Egrep Program748083 +Node: Id Program757084 +Node: Split Program767019 +Ref: Split Program-Footnote-1776912 +Node: Tee Program777085 +Node: Uniq Program779875 +Node: Wc Program787463 +Node: Bytes vs. Characters787850 +Node: Using extensions789398 +Node: wc program790152 +Node: Miscellaneous Programs795017 +Node: Dupword Program796230 +Node: Alarm Program798260 +Node: Translate Program803115 +Ref: Translate Program-Footnote-1807680 +Node: Labels Program807950 +Ref: Labels Program-Footnote-1811301 +Node: Word Sorting811385 +Node: History Sorting815457 +Node: Extract Program817682 +Node: Simple Sed825695 +Node: Igawk Program828769 +Ref: Igawk Program-Footnote-1843100 +Ref: Igawk Program-Footnote-2843302 +Ref: Igawk Program-Footnote-3843424 +Node: Anagram Program843539 +Node: Signature Program846601 +Node: Programs Summary847848 +Node: Programs Exercises849062 +Ref: Programs Exercises-Footnote-1853192 +Node: Advanced Features853278 +Node: Nondecimal Data855345 +Node: Array Sorting856936 +Node: Controlling Array Traversal857636 +Ref: Controlling Array Traversal-Footnote-1866004 +Node: Array Sorting Functions866122 +Ref: Array Sorting Functions-Footnote-1871496 +Node: Two-way I/O871692 +Ref: Two-way I/O-Footnote-1879418 +Ref: Two-way I/O-Footnote-2879605 +Node: TCP/IP Networking879687 +Node: Profiling882763 +Node: Extension Philosophy892072 +Node: Advanced Features Summary893551 +Node: Internationalization895566 +Node: I18N and L10N897240 +Node: Explaining gettext897927 +Ref: Explaining gettext-Footnote-1903819 +Ref: Explaining gettext-Footnote-2904004 +Node: Programmer i18n904169 +Ref: Programmer i18n-Footnote-1909118 +Node: Translator i18n909167 +Node: String Extraction909961 +Ref: String Extraction-Footnote-1911093 +Node: Printf Ordering911179 +Ref: Printf Ordering-Footnote-1913965 +Node: I18N Portability914029 +Ref: I18N Portability-Footnote-1916485 +Node: I18N Example916548 +Ref: I18N Example-Footnote-1919823 +Ref: I18N Example-Footnote-2919896 +Node: Gawk I18N920005 +Node: I18N Summary920627 +Node: Debugger921968 +Node: Debugging922968 +Node: Debugging Concepts923409 +Node: Debugging Terms925218 +Node: Awk Debugging927793 +Ref: Awk Debugging-Footnote-1928738 +Node: Sample Debugging Session928870 +Node: Debugger Invocation929404 +Node: Finding The Bug930790 +Node: List of Debugger Commands937264 +Node: Breakpoint Control938597 +Node: Debugger Execution Control942291 +Node: Viewing And Changing Data945653 +Node: Execution Stack949194 +Node: Debugger Info950831 +Node: Miscellaneous Debugger Commands954902 +Node: Readline Support959964 +Node: Limitations960860 +Node: Debugging Summary963414 +Node: Namespaces964693 +Node: Global Namespace965804 +Node: Qualified Names967202 +Node: Default Namespace968201 +Node: Changing The Namespace968942 +Node: Naming Rules970556 +Node: Internal Name Management972404 +Node: Namespace Example973446 +Node: Namespace And Features976008 +Node: Namespace Summary977443 +Node: Arbitrary Precision Arithmetic978920 +Node: Computer Arithmetic980407 +Ref: table-numeric-ranges984173 +Ref: table-floating-point-ranges984667 +Ref: Computer Arithmetic-Footnote-1985326 +Node: Math Definitions985383 +Ref: table-ieee-formats988699 +Ref: Math Definitions-Footnote-1989303 +Node: MPFR features989408 +Node: FP Math Caution991126 +Ref: FP Math Caution-Footnote-1992198 +Node: Inexactness of computations992567 +Node: Inexact representation993527 +Node: Comparing FP Values994887 +Node: Errors accumulate996128 +Node: Getting Accuracy997561 +Node: Try To Round1000271 +Node: Setting precision1001170 +Ref: table-predefined-precision-strings1001867 +Node: Setting the rounding mode1003698 +Ref: table-gawk-rounding-modes1004072 +Ref: Setting the rounding mode-Footnote-11008004 +Node: Arbitrary Precision Integers1008183 +Ref: Arbitrary Precision Integers-Footnote-11011358 +Node: Checking for MPFR1011507 +Node: POSIX Floating Point Problems1012981 +Ref: POSIX Floating Point Problems-Footnote-11017634 +Node: Floating point summary1017672 +Node: Dynamic Extensions1019862 +Node: Extension Intro1021415 +Node: Plugin License1022681 +Node: Extension Mechanism Outline1023478 +Ref: figure-load-extension1023917 +Ref: figure-register-new-function1025483 +Ref: figure-call-new-function1026576 +Node: Extension API Description1028639 +Node: Extension API Functions Introduction1030352 +Ref: table-api-std-headers1032188 +Node: General Data Types1036438 +Ref: General Data Types-Footnote-11045068 +Node: Memory Allocation Functions1045367 +Ref: Memory Allocation Functions-Footnote-11049868 +Node: Constructor Functions1049967 +Node: API Ownership of MPFR and GMP Values1053433 +Node: Registration Functions1054746 +Node: Extension Functions1055446 +Node: Exit Callback Functions1060768 +Node: Extension Version String1062018 +Node: Input Parsers1062681 +Node: Output Wrappers1075402 +Node: Two-way processors1079914 +Node: Printing Messages1082179 +Ref: Printing Messages-Footnote-11083350 +Node: Updating ERRNO1083503 +Node: Requesting Values1084242 +Ref: table-value-types-returned1084979 +Node: Accessing Parameters1085916 +Node: Symbol Table Access1087153 +Node: Symbol table by name1087665 +Ref: Symbol table by name-Footnote-11090690 +Node: Symbol table by cookie1090818 +Ref: Symbol table by cookie-Footnote-11095003 +Node: Cached values1095067 +Ref: Cached values-Footnote-11098603 +Node: Array Manipulation1098756 +Ref: Array Manipulation-Footnote-11099847 +Node: Array Data Types1099884 +Ref: Array Data Types-Footnote-11102542 +Node: Array Functions1102634 +Node: Flattening Arrays1107132 +Node: Creating Arrays1114108 +Node: Redirection API1118875 +Node: Extension API Variables1121708 +Node: Extension Versioning1122419 +Ref: gawk-api-version1122848 +Node: Extension GMP/MPFR Versioning1124580 +Node: Extension API Informational Variables1126208 +Node: Extension API Boilerplate1127281 +Node: Changes from API V11131255 +Node: Finding Extensions1132827 +Node: Extension Example1133386 +Node: Internal File Description1134184 +Node: Internal File Ops1138264 +Ref: Internal File Ops-Footnote-11149614 +Node: Using Internal File Ops1149754 +Ref: Using Internal File Ops-Footnote-11152137 +Node: Extension Samples1152411 +Node: Extension Sample File Functions1153940 +Node: Extension Sample Fnmatch1161589 +Node: Extension Sample Fork1163076 +Node: Extension Sample Inplace1164294 +Node: Extension Sample Ord1167920 +Node: Extension Sample Readdir1168756 +Ref: table-readdir-file-types1169645 +Node: Extension Sample Revout1170713 +Node: Extension Sample Rev2way1171302 +Node: Extension Sample Read write array1172042 +Node: Extension Sample Readfile1173984 +Node: Extension Sample Time1175079 +Node: Extension Sample API Tests1176831 +Node: gawkextlib1177323 +Node: Extension summary1180241 +Node: Extension Exercises1183943 +Node: Language History1185185 +Node: V7/SVR3.11186841 +Node: SVR41188993 +Node: POSIX1190427 +Node: BTL1191808 +Node: POSIX/GNU1192537 +Node: Feature History1198315 +Node: Common Extensions1215490 +Node: Ranges and Locales1216773 +Ref: Ranges and Locales-Footnote-11221389 +Ref: Ranges and Locales-Footnote-21221416 +Ref: Ranges and Locales-Footnote-31221651 +Node: Contributors1221874 +Node: History summary1227871 +Node: Installation1229251 +Node: Gawk Distribution1230195 +Node: Getting1230679 +Node: Extracting1231642 +Node: Distribution contents1233280 +Node: Unix Installation1240341 +Node: Quick Installation1241145 +Node: Compiling with MPFR1243565 +Node: Shell Startup Files1244255 +Node: Additional Configuration Options1245344 +Node: Configuration Philosophy1247659 +Node: Compiling from Git1250055 +Node: Building the Documentation1250610 +Node: Non-Unix Installation1251994 +Node: PC Installation1252454 +Node: PC Binary Installation1253292 +Node: PC Compiling1254165 +Node: PC Using1255282 +Node: Cygwin1258835 +Node: MSYS1260059 +Node: VMS Installation1260661 +Node: VMS Compilation1261380 +Ref: VMS Compilation-Footnote-11262609 +Node: VMS Dynamic Extensions1262667 +Node: VMS Installation Details1264352 +Node: VMS Running1266614 +Node: VMS GNV1270893 +Node: Bugs1271607 +Node: Bug definition1272519 +Node: Bug address1275455 +Node: Usenet1278843 +Node: Performance bugs1280032 +Node: Asking for help1282953 +Node: Maintainers1284920 +Node: Other Versions1286114 +Node: Installation summary1294278 +Node: Notes1295642 +Node: Compatibility Mode1296436 +Node: Additions1297218 +Node: Accessing The Source1298143 +Node: Adding Code1299580 +Node: New Ports1305772 +Node: Derived Files1310147 +Ref: Derived Files-Footnote-11315807 +Ref: Derived Files-Footnote-21315842 +Ref: Derived Files-Footnote-31316440 +Node: Future Extensions1316554 +Node: Implementation Limitations1317212 +Node: Extension Design1318422 +Node: Old Extension Problems1319566 +Ref: Old Extension Problems-Footnote-11321084 +Node: Extension New Mechanism Goals1321141 +Ref: Extension New Mechanism Goals-Footnote-11324505 +Node: Extension Other Design Decisions1324694 +Node: Extension Future Growth1326807 +Node: Notes summary1327413 +Node: Basic Concepts1328571 +Node: Basic High Level1329252 +Ref: figure-general-flow1329534 +Ref: figure-process-flow1330220 +Ref: Basic High Level-Footnote-11333522 +Node: Basic Data Typing1333707 +Node: Glossary1337035 +Node: Copying1368920 +Node: GNU Free Documentation License1406463 +Node: Index1431583 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 6466698f..bc12119a 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -22250,16 +22250,28 @@ built-in functions indirectly, as follows. @itemize @value{BULLET} @item You cannot pass a regular expression constant to a built-in function -through an indirect function call.@footnote{This may change in a future -version; recheck the documentation that comes with your version of -@command{gawk} to see if it has.} This applies to the @code{sub()}, +through an indirect function call. This applies to the @code{sub()}, @code{gsub()}, @code{gensub()}, @code{match()}, @code{split()} and -@code{patsplit()} functions. +@code{patsplit()} functions. However, you can pass a strongly typed +regexp constant (@pxref{Strong Regexp Constants}). @item If calling @code{sub()} or @code{gsub()}, you may only pass two arguments, since those functions are unusual in that they update their third argument. This means that @code{$0} will be updated. + +@item +You cannot indirectly call built-in functions that can take @code{$0} as +a default parameter; you must supply an argument instead. For example, +you must pass an argument to @code{length()} if calling it indirectly. + +@item +Calling a built-in function indirectly with the wrong number of arguments +for that function causes a fatal error. For example, calling +@code{length()} with two arguments. These errors are found at runtime +instead of when @command{gawk} parses your program, since @command{gawk} +doesn't know until runtime if you have passed the correct number of +arguments or not. @end itemize @command{gawk} does its best to make indirect function calls efficient. @@ -34984,6 +34996,14 @@ Similarly, in POSIX mode, @command{gawk} prints the result of the system's C @code{printf()} function using the @code{%g} format string for the value, whatever that may be. +@quotation NOTE +The sign used for NaN values can vary! The result depends upon both +the underlying system architecture and the underlying library used to +format NaN values. In particular, it's possible to get different results +for the same function call depending upon whether or not @command{gawk} +is running in MPFR mode (@option{-M}) or not. Caveat Emptor! +@end quotation + @node Floating point summary @section Summary diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 283cb967..72945757 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -21162,16 +21162,28 @@ built-in functions indirectly, as follows. @itemize @value{BULLET} @item You cannot pass a regular expression constant to a built-in function -through an indirect function call.@footnote{This may change in a future -version; recheck the documentation that comes with your version of -@command{gawk} to see if it has.} This applies to the @code{sub()}, +through an indirect function call. This applies to the @code{sub()}, @code{gsub()}, @code{gensub()}, @code{match()}, @code{split()} and -@code{patsplit()} functions. +@code{patsplit()} functions. However, you can pass a strongly typed +regexp constant (@pxref{Strong Regexp Constants}). @item If calling @code{sub()} or @code{gsub()}, you may only pass two arguments, since those functions are unusual in that they update their third argument. This means that @code{$0} will be updated. + +@item +You cannot indirectly call built-in functions that can take @code{$0} as +a default parameter; you must supply an argument instead. For example, +you must pass an argument to @code{length()} if calling it indirectly. + +@item +Calling a built-in function indirectly with the wrong number of arguments +for that function causes a fatal error. For example, calling +@code{length()} with two arguments. These errors are found at runtime +instead of when @command{gawk} parses your program, since @command{gawk} +doesn't know until runtime if you have passed the correct number of +arguments or not. @end itemize @command{gawk} does its best to make indirect function calls efficient. @@ -33827,6 +33839,14 @@ Similarly, in POSIX mode, @command{gawk} prints the result of the system's C @code{printf()} function using the @code{%g} format string for the value, whatever that may be. +@quotation NOTE +The sign used for NaN values can vary! The result depends upon both +the underlying system architecture and the underlying library used to +format NaN values. In particular, it's possible to get different results +for the same function call depending upon whether or not @command{gawk} +is running in MPFR mode (@option{-M}) or not. Caveat Emptor! +@end quotation + @node Floating point summary @section Summary |