diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 549 |
1 files changed, 285 insertions, 264 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index 08fbc297..b97acf46 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -9750,6 +9750,27 @@ with a pound sign (`#'). test if an element in `SYMTAB' is an array. Also, you may not use the `delete' statement with the `SYMTAB' array. + You may use an index for `SYMTAB' that is not a predefined + identifer: + + SYMTAB["xxx"] = 5 + print SYMTAB["xxx"] + + This works as expected: in this case `SYMTAB' acts just like a + regular array. The only difference is that you can't then delete + `SYMTAB["xxx"]'. + + The `SYMTAB' array is more interesting than it looks. Andrew Schorr + points out that it effectively gives `awk' data pointers. Consider + his example: + + # Indirect multiply of any variable by amount, return result + + function multiply(variable, amount) + { + return SYMTAB[variable] *= amount + } + NOTE: In order to avoid severe time-travel paradoxes(2), neither `FUNCTAB' nor `SYMTAB' are available as elements within the `SYMTAB' array. @@ -26022,7 +26043,7 @@ Index (line 67) * advanced features, data files as single record: Records. (line 180) * advanced features, fixed-width data: Constant Size. (line 9) -* advanced features, FNR/NR variables: Auto-set. (line 274) +* advanced features, FNR/NR variables: Auto-set. (line 295) * advanced features, gawk: Advanced Features. (line 6) * advanced features, gawk, network programming: TCP/IP Networking. (line 6) @@ -26527,7 +26548,7 @@ Index (line 47) * dark corner, FILENAME variable <1>: Auto-set. (line 93) * dark corner, FILENAME variable: Getline Notes. (line 19) -* dark corner, FNR/NR variables: Auto-set. (line 274) +* dark corner, FNR/NR variables: Auto-set. (line 295) * dark corner, format-control characters: Control Letters. (line 18) * dark corner, FS as null string: Single Character Fields. (line 20) @@ -27009,7 +27030,7 @@ Index * floating-point, numbers: General Arithmetic. (line 6) * FNR variable <1>: Auto-set. (line 103) * FNR variable: Records. (line 6) -* FNR variable, changing: Auto-set. (line 274) +* FNR variable, changing: Auto-set. (line 295) * for statement: For Statement. (line 6) * for statement, in arrays: Scanning an Array. (line 20) * format specifiers, mixing regular with positional specifiers: Printf Ordering. @@ -27594,7 +27615,7 @@ Index * not Boolean-logic operator: Boolean Ops. (line 6) * NR variable <1>: Auto-set. (line 125) * NR variable: Records. (line 6) -* NR variable, changing: Auto-set. (line 274) +* NR variable, changing: Auto-set. (line 295) * null strings <1>: Basic Data Typing. (line 26) * null strings <2>: Truth Values. (line 6) * null strings <3>: Regexp Field Splitting. @@ -28674,265 +28695,265 @@ Node: Built-in Variables393879 Node: User-modified394974 Ref: User-modified-Footnote-1403329 Node: Auto-set403391 -Ref: Auto-set-Footnote-1415085 -Ref: Auto-set-Footnote-2415290 -Node: ARGC and ARGV415346 -Node: Arrays419197 -Node: Array Basics420702 -Node: Array Intro421528 -Node: Reference to Elements425846 -Node: Assigning Elements428116 -Node: Array Example428607 -Node: Scanning an Array430339 -Node: Controlling Scanning432653 -Ref: Controlling Scanning-Footnote-1437586 -Node: Delete437902 -Ref: Delete-Footnote-1440667 -Node: Numeric Array Subscripts440724 -Node: Uninitialized Subscripts442907 -Node: Multi-dimensional444535 -Node: Multi-scanning447629 -Node: Arrays of Arrays449220 -Node: Functions453865 -Node: Built-in454687 -Node: Calling Built-in455765 -Node: Numeric Functions457753 -Ref: Numeric Functions-Footnote-1461585 -Ref: Numeric Functions-Footnote-2461942 -Ref: Numeric Functions-Footnote-3461990 -Node: String Functions462259 -Ref: String Functions-Footnote-1485756 -Ref: String Functions-Footnote-2485885 -Ref: String Functions-Footnote-3486133 -Node: Gory Details486220 -Ref: table-sub-escapes487899 -Ref: table-sub-posix-92489253 -Ref: table-sub-proposed490596 -Ref: table-posix-sub491946 -Ref: table-gensub-escapes493492 -Ref: Gory Details-Footnote-1494699 -Ref: Gory Details-Footnote-2494750 -Node: I/O Functions494901 -Ref: I/O Functions-Footnote-1501556 -Node: Time Functions501703 -Ref: Time Functions-Footnote-1512595 -Ref: Time Functions-Footnote-2512663 -Ref: Time Functions-Footnote-3512821 -Ref: Time Functions-Footnote-4512932 -Ref: Time Functions-Footnote-5513044 -Ref: Time Functions-Footnote-6513271 -Node: Bitwise Functions513537 -Ref: table-bitwise-ops514095 -Ref: Bitwise Functions-Footnote-1518316 -Node: Type Functions518500 -Node: I18N Functions518970 -Node: User-defined520597 -Node: Definition Syntax521401 -Ref: Definition Syntax-Footnote-1526311 -Node: Function Example526380 -Node: Function Caveats528974 -Node: Calling A Function529395 -Node: Variable Scope530510 -Node: Pass By Value/Reference532485 -Node: Return Statement535925 -Node: Dynamic Typing538906 -Node: Indirect Calls539641 -Node: Internationalization549326 -Node: I18N and L10N550752 -Node: Explaining gettext551438 -Ref: Explaining gettext-Footnote-1556504 -Ref: Explaining gettext-Footnote-2556688 -Node: Programmer i18n556853 -Node: Translator i18n561053 -Node: String Extraction561846 -Ref: String Extraction-Footnote-1562807 -Node: Printf Ordering562893 -Ref: Printf Ordering-Footnote-1565677 -Node: I18N Portability565741 -Ref: I18N Portability-Footnote-1568190 -Node: I18N Example568253 -Ref: I18N Example-Footnote-1570888 -Node: Gawk I18N570960 -Node: Advanced Features571577 -Node: Nondecimal Data573090 -Node: Array Sorting574673 -Node: Controlling Array Traversal575370 -Node: Array Sorting Functions583608 -Ref: Array Sorting Functions-Footnote-1587282 -Ref: Array Sorting Functions-Footnote-2587375 -Node: Two-way I/O587569 -Ref: Two-way I/O-Footnote-1593001 -Node: TCP/IP Networking593071 -Node: Profiling595915 -Node: Library Functions603369 -Ref: Library Functions-Footnote-1606376 -Node: Library Names606547 -Ref: Library Names-Footnote-1610018 -Ref: Library Names-Footnote-2610238 -Node: General Functions610324 -Node: Strtonum Function611277 -Node: Assert Function614207 -Node: Round Function617533 -Node: Cliff Random Function619076 -Node: Ordinal Functions620092 -Ref: Ordinal Functions-Footnote-1623162 -Ref: Ordinal Functions-Footnote-2623414 -Node: Join Function623623 -Ref: Join Function-Footnote-1625394 -Node: Getlocaltime Function625594 -Node: Data File Management629309 -Node: Filetrans Function629941 -Node: Rewind Function634080 -Node: File Checking635467 -Node: Empty Files636561 -Node: Ignoring Assigns638791 -Node: Getopt Function640344 -Ref: Getopt Function-Footnote-1651648 -Node: Passwd Functions651851 -Ref: Passwd Functions-Footnote-1660826 -Node: Group Functions660914 -Node: Walking Arrays668998 -Node: Sample Programs670567 -Node: Running Examples671232 -Node: Clones671960 -Node: Cut Program673184 -Node: Egrep Program683029 -Ref: Egrep Program-Footnote-1690802 -Node: Id Program690912 -Node: Split Program694528 -Ref: Split Program-Footnote-1698047 -Node: Tee Program698175 -Node: Uniq Program700978 -Node: Wc Program708407 -Ref: Wc Program-Footnote-1712673 -Ref: Wc Program-Footnote-2712873 -Node: Miscellaneous Programs712965 -Node: Dupword Program714153 -Node: Alarm Program716184 -Node: Translate Program720933 -Ref: Translate Program-Footnote-1725320 -Ref: Translate Program-Footnote-2725548 -Node: Labels Program725682 -Ref: Labels Program-Footnote-1729053 -Node: Word Sorting729137 -Node: History Sorting733021 -Node: Extract Program734860 -Ref: Extract Program-Footnote-1742343 -Node: Simple Sed742471 -Node: Igawk Program745533 -Ref: Igawk Program-Footnote-1760690 -Ref: Igawk Program-Footnote-2760891 -Node: Anagram Program761029 -Node: Signature Program764097 -Node: Debugger765197 -Node: Debugging766163 -Node: Debugging Concepts766596 -Node: Debugging Terms768452 -Node: Awk Debugging771049 -Node: Sample Debugging Session771941 -Node: Debugger Invocation772461 -Node: Finding The Bug773790 -Node: List of Debugger Commands780278 -Node: Breakpoint Control781612 -Node: Debugger Execution Control785276 -Node: Viewing And Changing Data788636 -Node: Execution Stack791992 -Node: Debugger Info793459 -Node: Miscellaneous Debugger Commands797440 -Node: Readline Support802885 -Node: Limitations803716 -Node: Arbitrary Precision Arithmetic805968 -Ref: Arbitrary Precision Arithmetic-Footnote-1807610 -Node: General Arithmetic807758 -Node: Floating Point Issues809478 -Node: String Conversion Precision810359 -Ref: String Conversion Precision-Footnote-1812065 -Node: Unexpected Results812174 -Node: POSIX Floating Point Problems814327 -Ref: POSIX Floating Point Problems-Footnote-1818152 -Node: Integer Programming818190 -Node: Floating-point Programming819943 -Ref: Floating-point Programming-Footnote-1826252 -Node: Floating-point Representation826516 -Node: Floating-point Context827681 -Ref: table-ieee-formats828523 -Node: Rounding Mode829907 -Ref: table-rounding-modes830386 -Ref: Rounding Mode-Footnote-1833390 -Node: Gawk and MPFR833571 -Node: Arbitrary Precision Floats834813 -Ref: Arbitrary Precision Floats-Footnote-1837242 -Node: Setting Precision837553 -Node: Setting Rounding Mode840286 -Ref: table-gawk-rounding-modes840690 -Node: Floating-point Constants841870 -Node: Changing Precision843294 -Ref: Changing Precision-Footnote-1844694 -Node: Exact Arithmetic844868 -Node: Arbitrary Precision Integers847976 -Ref: Arbitrary Precision Integers-Footnote-1850976 -Node: Dynamic Extensions851123 -Node: Plugin License852041 -Node: Sample Library852655 -Node: Internal File Description853339 -Node: Internal File Ops857052 -Ref: Internal File Ops-Footnote-1861615 -Node: Using Internal File Ops861755 -Node: Language History864131 -Node: V7/SVR3.1865653 -Node: SVR4867974 -Node: POSIX869416 -Node: BTL870424 -Node: POSIX/GNU871158 -Node: Common Extensions876693 -Node: Ranges and Locales877800 -Ref: Ranges and Locales-Footnote-1882418 -Ref: Ranges and Locales-Footnote-2882445 -Ref: Ranges and Locales-Footnote-3882705 -Node: Contributors882926 -Node: Installation887222 -Node: Gawk Distribution888116 -Node: Getting888600 -Node: Extracting889426 -Node: Distribution contents891118 -Node: Unix Installation896340 -Node: Quick Installation896957 -Node: Additional Configuration Options898919 -Node: Configuration Philosophy900396 -Node: Non-Unix Installation902738 -Node: PC Installation903196 -Node: PC Binary Installation904495 -Node: PC Compiling906343 -Node: PC Testing909287 -Node: PC Using910463 -Node: Cygwin914648 -Node: MSYS915648 -Node: VMS Installation916162 -Node: VMS Compilation916765 -Ref: VMS Compilation-Footnote-1917772 -Node: VMS Installation Details917830 -Node: VMS Running919465 -Node: VMS Old Gawk921072 -Node: Bugs921546 -Node: Other Versions925398 -Node: Notes930713 -Node: Compatibility Mode931300 -Node: Additions932083 -Node: Accessing The Source933010 -Node: Adding Code934436 -Node: New Ports940478 -Node: Derived Files944613 -Ref: Derived Files-Footnote-1949918 -Ref: Derived Files-Footnote-2949952 -Ref: Derived Files-Footnote-3950552 -Node: Future Extensions950650 -Node: Basic Concepts952137 -Node: Basic High Level952818 -Ref: Basic High Level-Footnote-1956853 -Node: Basic Data Typing957038 -Node: Glossary960393 -Node: Copying985568 -Node: GNU Free Documentation License1023125 -Node: Index1048262 +Ref: Auto-set-Footnote-1415742 +Ref: Auto-set-Footnote-2415947 +Node: ARGC and ARGV416003 +Node: Arrays419854 +Node: Array Basics421359 +Node: Array Intro422185 +Node: Reference to Elements426503 +Node: Assigning Elements428773 +Node: Array Example429264 +Node: Scanning an Array430996 +Node: Controlling Scanning433310 +Ref: Controlling Scanning-Footnote-1438243 +Node: Delete438559 +Ref: Delete-Footnote-1441324 +Node: Numeric Array Subscripts441381 +Node: Uninitialized Subscripts443564 +Node: Multi-dimensional445192 +Node: Multi-scanning448286 +Node: Arrays of Arrays449877 +Node: Functions454522 +Node: Built-in455344 +Node: Calling Built-in456422 +Node: Numeric Functions458410 +Ref: Numeric Functions-Footnote-1462242 +Ref: Numeric Functions-Footnote-2462599 +Ref: Numeric Functions-Footnote-3462647 +Node: String Functions462916 +Ref: String Functions-Footnote-1486413 +Ref: String Functions-Footnote-2486542 +Ref: String Functions-Footnote-3486790 +Node: Gory Details486877 +Ref: table-sub-escapes488556 +Ref: table-sub-posix-92489910 +Ref: table-sub-proposed491253 +Ref: table-posix-sub492603 +Ref: table-gensub-escapes494149 +Ref: Gory Details-Footnote-1495356 +Ref: Gory Details-Footnote-2495407 +Node: I/O Functions495558 +Ref: I/O Functions-Footnote-1502213 +Node: Time Functions502360 +Ref: Time Functions-Footnote-1513252 +Ref: Time Functions-Footnote-2513320 +Ref: Time Functions-Footnote-3513478 +Ref: Time Functions-Footnote-4513589 +Ref: Time Functions-Footnote-5513701 +Ref: Time Functions-Footnote-6513928 +Node: Bitwise Functions514194 +Ref: table-bitwise-ops514752 +Ref: Bitwise Functions-Footnote-1518973 +Node: Type Functions519157 +Node: I18N Functions519627 +Node: User-defined521254 +Node: Definition Syntax522058 +Ref: Definition Syntax-Footnote-1526968 +Node: Function Example527037 +Node: Function Caveats529631 +Node: Calling A Function530052 +Node: Variable Scope531167 +Node: Pass By Value/Reference533142 +Node: Return Statement536582 +Node: Dynamic Typing539563 +Node: Indirect Calls540298 +Node: Internationalization549983 +Node: I18N and L10N551409 +Node: Explaining gettext552095 +Ref: Explaining gettext-Footnote-1557161 +Ref: Explaining gettext-Footnote-2557345 +Node: Programmer i18n557510 +Node: Translator i18n561710 +Node: String Extraction562503 +Ref: String Extraction-Footnote-1563464 +Node: Printf Ordering563550 +Ref: Printf Ordering-Footnote-1566334 +Node: I18N Portability566398 +Ref: I18N Portability-Footnote-1568847 +Node: I18N Example568910 +Ref: I18N Example-Footnote-1571545 +Node: Gawk I18N571617 +Node: Advanced Features572234 +Node: Nondecimal Data573747 +Node: Array Sorting575330 +Node: Controlling Array Traversal576027 +Node: Array Sorting Functions584265 +Ref: Array Sorting Functions-Footnote-1587939 +Ref: Array Sorting Functions-Footnote-2588032 +Node: Two-way I/O588226 +Ref: Two-way I/O-Footnote-1593658 +Node: TCP/IP Networking593728 +Node: Profiling596572 +Node: Library Functions604026 +Ref: Library Functions-Footnote-1607033 +Node: Library Names607204 +Ref: Library Names-Footnote-1610675 +Ref: Library Names-Footnote-2610895 +Node: General Functions610981 +Node: Strtonum Function611934 +Node: Assert Function614864 +Node: Round Function618190 +Node: Cliff Random Function619733 +Node: Ordinal Functions620749 +Ref: Ordinal Functions-Footnote-1623819 +Ref: Ordinal Functions-Footnote-2624071 +Node: Join Function624280 +Ref: Join Function-Footnote-1626051 +Node: Getlocaltime Function626251 +Node: Data File Management629966 +Node: Filetrans Function630598 +Node: Rewind Function634737 +Node: File Checking636124 +Node: Empty Files637218 +Node: Ignoring Assigns639448 +Node: Getopt Function641001 +Ref: Getopt Function-Footnote-1652305 +Node: Passwd Functions652508 +Ref: Passwd Functions-Footnote-1661483 +Node: Group Functions661571 +Node: Walking Arrays669655 +Node: Sample Programs671224 +Node: Running Examples671889 +Node: Clones672617 +Node: Cut Program673841 +Node: Egrep Program683686 +Ref: Egrep Program-Footnote-1691459 +Node: Id Program691569 +Node: Split Program695185 +Ref: Split Program-Footnote-1698704 +Node: Tee Program698832 +Node: Uniq Program701635 +Node: Wc Program709064 +Ref: Wc Program-Footnote-1713330 +Ref: Wc Program-Footnote-2713530 +Node: Miscellaneous Programs713622 +Node: Dupword Program714810 +Node: Alarm Program716841 +Node: Translate Program721590 +Ref: Translate Program-Footnote-1725977 +Ref: Translate Program-Footnote-2726205 +Node: Labels Program726339 +Ref: Labels Program-Footnote-1729710 +Node: Word Sorting729794 +Node: History Sorting733678 +Node: Extract Program735517 +Ref: Extract Program-Footnote-1743000 +Node: Simple Sed743128 +Node: Igawk Program746190 +Ref: Igawk Program-Footnote-1761347 +Ref: Igawk Program-Footnote-2761548 +Node: Anagram Program761686 +Node: Signature Program764754 +Node: Debugger765854 +Node: Debugging766820 +Node: Debugging Concepts767253 +Node: Debugging Terms769109 +Node: Awk Debugging771706 +Node: Sample Debugging Session772598 +Node: Debugger Invocation773118 +Node: Finding The Bug774447 +Node: List of Debugger Commands780935 +Node: Breakpoint Control782269 +Node: Debugger Execution Control785933 +Node: Viewing And Changing Data789293 +Node: Execution Stack792649 +Node: Debugger Info794116 +Node: Miscellaneous Debugger Commands798097 +Node: Readline Support803542 +Node: Limitations804373 +Node: Arbitrary Precision Arithmetic806625 +Ref: Arbitrary Precision Arithmetic-Footnote-1808267 +Node: General Arithmetic808415 +Node: Floating Point Issues810135 +Node: String Conversion Precision811016 +Ref: String Conversion Precision-Footnote-1812722 +Node: Unexpected Results812831 +Node: POSIX Floating Point Problems814984 +Ref: POSIX Floating Point Problems-Footnote-1818809 +Node: Integer Programming818847 +Node: Floating-point Programming820600 +Ref: Floating-point Programming-Footnote-1826909 +Node: Floating-point Representation827173 +Node: Floating-point Context828338 +Ref: table-ieee-formats829180 +Node: Rounding Mode830564 +Ref: table-rounding-modes831043 +Ref: Rounding Mode-Footnote-1834047 +Node: Gawk and MPFR834228 +Node: Arbitrary Precision Floats835470 +Ref: Arbitrary Precision Floats-Footnote-1837899 +Node: Setting Precision838210 +Node: Setting Rounding Mode840943 +Ref: table-gawk-rounding-modes841347 +Node: Floating-point Constants842527 +Node: Changing Precision843951 +Ref: Changing Precision-Footnote-1845351 +Node: Exact Arithmetic845525 +Node: Arbitrary Precision Integers848633 +Ref: Arbitrary Precision Integers-Footnote-1851633 +Node: Dynamic Extensions851780 +Node: Plugin License852698 +Node: Sample Library853312 +Node: Internal File Description853996 +Node: Internal File Ops857709 +Ref: Internal File Ops-Footnote-1862272 +Node: Using Internal File Ops862412 +Node: Language History864788 +Node: V7/SVR3.1866310 +Node: SVR4868631 +Node: POSIX870073 +Node: BTL871081 +Node: POSIX/GNU871815 +Node: Common Extensions877350 +Node: Ranges and Locales878457 +Ref: Ranges and Locales-Footnote-1883075 +Ref: Ranges and Locales-Footnote-2883102 +Ref: Ranges and Locales-Footnote-3883362 +Node: Contributors883583 +Node: Installation887879 +Node: Gawk Distribution888773 +Node: Getting889257 +Node: Extracting890083 +Node: Distribution contents891775 +Node: Unix Installation896997 +Node: Quick Installation897614 +Node: Additional Configuration Options899576 +Node: Configuration Philosophy901053 +Node: Non-Unix Installation903395 +Node: PC Installation903853 +Node: PC Binary Installation905152 +Node: PC Compiling907000 +Node: PC Testing909944 +Node: PC Using911120 +Node: Cygwin915305 +Node: MSYS916305 +Node: VMS Installation916819 +Node: VMS Compilation917422 +Ref: VMS Compilation-Footnote-1918429 +Node: VMS Installation Details918487 +Node: VMS Running920122 +Node: VMS Old Gawk921729 +Node: Bugs922203 +Node: Other Versions926055 +Node: Notes931370 +Node: Compatibility Mode931957 +Node: Additions932740 +Node: Accessing The Source933667 +Node: Adding Code935093 +Node: New Ports941135 +Node: Derived Files945270 +Ref: Derived Files-Footnote-1950575 +Ref: Derived Files-Footnote-2950609 +Ref: Derived Files-Footnote-3951209 +Node: Future Extensions951307 +Node: Basic Concepts952794 +Node: Basic High Level953475 +Ref: Basic High Level-Footnote-1957510 +Node: Basic Data Typing957695 +Node: Glossary961050 +Node: Copying986225 +Node: GNU Free Documentation License1023782 +Node: Index1048919 End Tag Table |