diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 1128 |
1 files changed, 572 insertions, 556 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index bff22dc9..1d8022f0 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2222,7 +2222,7 @@ determining the type of a variable, and array sorting. As we develop our presentation of the `awk' language, we introduce most of the variables and many of the functions. They are described -systematically in *note Built-in Variables::, and *note Built-in::. +systematically in *note Built-in Variables::, and in *note Built-in::. File: gawk.info, Node: When, Next: Intro Summary, Prev: Other Features, Up: Getting Started @@ -13871,7 +13871,7 @@ File: gawk.info, Node: Indirect Calls, Next: Functions Summary, Prev: User-de 9.3 Indirect Function Calls =========================== -This section describes a `gawk'-specific extension. +This section describes an advanced, `gawk'-specific extension. Often, you may wish to defer the choice of function to call until runtime. For example, you may have different kinds of records, each of @@ -13910,7 +13910,7 @@ your test scores: This style of programming works, but can be awkward. With "indirect" function calls, you tell `gawk' to use the _value_ of a variable as the -name of the function to call. +_name_ of the function to call. The syntax is similar to that of a regular function call: an identifier immediately followed by a left parenthesis, any arguments, @@ -13952,7 +13952,6 @@ using indirect function calls. Otherwise they perform the expected computations and are not unusual. # For each record, print the class name and the requested statistics - { class_name = $1 gsub(/_/, " ", class_name) # Replace _ with spaces @@ -14139,11 +14138,11 @@ names of the two comparison functions: Remember that you must supply a leading `@' in front of an indirect function call. - Unfortunately, indirect function calls cannot be used with the -built-in functions. However, you can generally write "wrapper" -functions which call the built-in ones, and those can be called -indirectly. (Other than, perhaps, the mathematical functions, there is -not a lot of reason to try to call the built-in functions indirectly.) + Starting with version 4.1.2 of `gawk', indirect function calls may +also be used with built-in functions and with extension functions +(*note Dynamic Extensions::). The only thing you cannot do is pass a +regular expression constant to a built-in function through an indirect +function call.(1) `gawk' does its best to make indirect function calls efficient. For example, in the following case: @@ -14151,7 +14150,12 @@ example, in the following case: for (i = 1; i <= n; i++) @the_func() -`gawk' will look up the actual function to call only once. +`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 @@ -14188,7 +14192,9 @@ File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions * User-defined functions may call other user-defined (and built-in) functions and may call themselves recursively. Function parameters - "hide" any global variables of the same names. + "hide" any global variables of the same names. You cannot use the + name of a reserved variable (such as `ARGC') as the name of a + parameter in user-defined functions. * Scalar values are passed to user-defined functions by value. Array parameters are passed by reference; any changes made by the @@ -14204,10 +14210,9 @@ File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions either scalar or array. * `gawk' provides indirect function calls using a special syntax. - By setting a variable to the name of a user-defined function, you - can determine at runtime what function will be called at that - point in the program. This is equivalent to function pointers in C - and C++. + By setting a variable to the name of a function, you can determine + at runtime what function will be called at that point in the + program. This is equivalent to function pointers in C and C++. @@ -14898,7 +14903,7 @@ that might be as follows: This function reads from `file' one record at a time, building up the full contents of the file in the local variable `contents'. It -works, but is not necessarily efficient.(1) +works, but is not necessarily efficient. The following function, based on a suggestion by Denis Shirokov, reads the entire contents of the named file in one shot: @@ -14933,13 +14938,6 @@ string. Thus calling code may use something like: This tests the result to see if it is empty or not. An equivalent test would be `contents == ""'. - ---------- Footnotes ---------- - - (1) Execution time grows quadratically in the size of the input; for -each record, `awk' has to allocate a bigger internal buffer for -`contents', copy the old contents into it, and then append the contents -of the new record. - File: gawk.info, Node: Data File Management, Next: Getopt Function, Prev: General Functions, Up: Library Functions @@ -17072,7 +17070,7 @@ standard output, `/dev/stdout': else if (c == "c") do_count++ else if (index("0123456789", c) != 0) { - # getopt requires args to options + # getopt() requires args to options # this messes us up for things like -5 if (Optarg ~ /^[[:digit:]]+$/) fcount = (c Optarg) + 0 @@ -17669,8 +17667,8 @@ program. enclosed in square brackets (`[a-z]') and quoted, to prevent the shell from attempting a file name expansion. This is not a feature. - (2) This program was written before `gawk' acquired the ability to -split each character in a string into separate array elements. + (2) This program was also written before `gawk' acquired the ability +to split each character in a string into separate array elements. File: gawk.info, Node: Labels Program, Next: Word Sorting, Prev: Translate Program, Up: Miscellaneous Programs @@ -18763,23 +18761,35 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample 5. The `split.awk' program (*note Split Program::) assumes that letters are contiguous in the character set, which isn't true for - EBCDIC systems. Fix this problem. - - 6. Why can't the `wc.awk' program (*note Wc Program::) just use the + EBCDIC systems. Fix this problem. (Hint: Consider a different + way to work through the alphabet, without relying on `ord()' and + `chr()'.) + + 6. In `uniq.awk' (*note Uniq Program::, the logic for choosing which + lines to print represents a "state machine", which is "a device + that can be in one of a set number of stable conditions depending + on its previous condition and on the present values of its + inputs."(1) Brian Kernighan suggests that "an alternative approach + to state mechines is to just read the input into an array, then + use indexing. It's almost always easier code, and for most inputs + where you would use this, just as fast." Rewrite the logic to + follow this suggestion. + + 7. Why can't the `wc.awk' program (*note Wc Program::) just use the value of `FNR' in `endfile()'? Hint: Examine the code in *note Filetrans Function::. - 7. Manipulation of individual characters in the `translate' program + 8. Manipulation of individual characters in the `translate' program (*note Translate Program::) is painful using standard `awk' functions. Given that `gawk' can split strings into individual characters using `""' as the separator, how might you use this feature to simplify the program? - 8. The `extract.awk' program (*note Extract Program::) was written + 9. The `extract.awk' program (*note Extract Program::) was written before `gawk' had the `gensub()' function. Use it to simplify the code. - 9. Compare the performance of the `awksed.awk' program (*note Simple + 10. Compare the performance of the `awksed.awk' program (*note Simple Sed::) with the more straightforward: BEGIN { @@ -18790,16 +18800,16 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample { gsub(pat, repl); print } - 10. What are the advantages and disadvantages of `awksed.awk' versus + 11. What are the advantages and disadvantages of `awksed.awk' versus the real `sed' utility? - 11. In *note Igawk Program::, we mentioned that not trying to save the + 12. In *note Igawk Program::, we mentioned that not trying to save the line read with `getline' in the `pathto()' function when testing for the file's accessibility for use with the main program simplifies things considerably. What problem does this engender though? - 12. As an additional example of the idea that it is not always + 13. As an additional example of the idea that it is not always necessary to add new features to a program, consider the idea of having two files in a directory in the search path: @@ -18822,10 +18832,15 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample `@include' statements for the desired library functions. Make this change. - 13. Modify `anagram.awk' (*note Anagram Program::), to avoid the use + 14. Modify `anagram.awk' (*note Anagram Program::), to avoid the use of the external `sort' utility. + ---------- Footnotes ---------- + + (1) This is the definition returned from entering `define: state +machine' into Google. + File: gawk.info, Node: Advanced Features, Next: Internationalization, Prev: Sample Programs, Up: Top @@ -21376,7 +21391,7 @@ some limitations. A few which are worth being aware of are: what your mistake was, though, you'll feel like a real guru. * If you perused the dump of opcodes in *note Miscellaneous Debugger - Commands::, (or if you are already familiar with `gawk' internals), + Commands:: (or if you are already familiar with `gawk' internals), you will realize that much of the internal manipulation of data in `gawk', as in many interpreters, is done on a stack. `Op_push', `Op_pop', etc., are the "bread and butter" of most `gawk' code. @@ -32104,7 +32119,7 @@ Index (line 66) * directories, command-line: Command-line directories. (line 6) -* directories, searching: Programs Exercises. (line 63) +* directories, searching: Programs Exercises. (line 75) * directories, searching for loadable extensions: AWKLIBPATH Variable. (line 6) * directories, searching for source files: AWKPATH Variable. (line 6) @@ -32386,7 +32401,7 @@ Index * files, reading, multiline records: Multiple Line. (line 6) * files, searching for regular expressions: Egrep Program. (line 6) * files, skipping: File Checking. (line 6) -* files, source, search path for: Programs Exercises. (line 63) +* files, source, search path for: Programs Exercises. (line 75) * files, splitting: Split Program. (line 6) * files, Texinfo, extracting programs from: Extract Program. (line 6) * find substring in string: String Functions. (line 155) @@ -33554,11 +33569,11 @@ Index * search in string: String Functions. (line 155) * search paths <1>: VMS Running. (line 58) * search paths <2>: PC Using. (line 10) -* search paths: Programs Exercises. (line 63) +* search paths: Programs Exercises. (line 75) * search paths, for loadable extensions: AWKLIBPATH Variable. (line 6) * search paths, for source files <1>: VMS Running. (line 58) * search paths, for source files <2>: PC Using. (line 10) -* search paths, for source files <3>: Programs Exercises. (line 63) +* search paths, for source files <3>: Programs Exercises. (line 75) * search paths, for source files: AWKPATH Variable. (line 6) * searching, files for regular expressions: Egrep Program. (line 6) * searching, for words: Dupword Program. (line 6) @@ -33705,7 +33720,7 @@ Index * source code, QSE Awk: Other Versions. (line 131) * source code, QuikTrim Awk: Other Versions. (line 135) * source code, Solaris awk: Other Versions. (line 96) -* source files, search path for: Programs Exercises. (line 63) +* source files, search path for: Programs Exercises. (line 75) * sparse arrays: Array Intro. (line 72) * Spencer, Henry: Glossary. (line 11) * split: String Functions. (line 313) @@ -34096,519 +34111,520 @@ Ref: More Complex-Footnote-1102513 Node: Statements/Lines102598 Ref: Statements/Lines-Footnote-1107054 Node: Other Features107319 -Node: When108247 -Ref: When-Footnote-1110003 -Node: Intro Summary110068 -Node: Invoking Gawk110951 -Node: Command Line112466 -Node: Options113257 -Ref: Options-Footnote-1128904 -Node: Other Arguments128929 -Node: Naming Standard Input131757 -Node: Environment Variables132850 -Node: AWKPATH Variable133408 -Ref: AWKPATH Variable-Footnote-1136274 -Ref: AWKPATH Variable-Footnote-2136319 -Node: AWKLIBPATH Variable136579 -Node: Other Environment Variables137338 -Node: Exit Status140790 -Node: Include Files141465 -Node: Loading Shared Libraries145043 -Node: Obsolete146427 -Node: Undocumented147124 -Node: Invoking Summary147391 -Node: Regexp148991 -Node: Regexp Usage150450 -Node: Escape Sequences152483 -Node: Regexp Operators158554 -Ref: Regexp Operators-Footnote-1165985 -Ref: Regexp Operators-Footnote-2166132 -Node: Bracket Expressions166230 -Ref: table-char-classes168248 -Node: Leftmost Longest171188 -Node: Computed Regexps172392 -Node: GNU Regexp Operators175770 -Node: Case-sensitivity179476 -Ref: Case-sensitivity-Footnote-1182366 -Ref: Case-sensitivity-Footnote-2182601 -Node: Regexp Summary182709 -Node: Reading Files184178 -Node: Records186270 -Node: awk split records186992 -Node: gawk split records191850 -Ref: gawk split records-Footnote-1196371 -Node: Fields196408 -Ref: Fields-Footnote-1199372 -Node: Nonconstant Fields199458 -Ref: Nonconstant Fields-Footnote-1201688 -Node: Changing Fields201890 -Node: Field Separators207844 -Node: Default Field Splitting210546 -Node: Regexp Field Splitting211663 -Node: Single Character Fields214990 -Node: Command Line Field Separator216049 -Node: Full Line Fields219475 -Ref: Full Line Fields-Footnote-1219983 -Node: Field Splitting Summary220029 -Ref: Field Splitting Summary-Footnote-1223161 -Node: Constant Size223262 -Node: Splitting By Content227868 -Ref: Splitting By Content-Footnote-1231941 -Node: Multiple Line231981 -Ref: Multiple Line-Footnote-1237837 -Node: Getline238016 -Node: Plain Getline240227 -Node: Getline/Variable242933 -Node: Getline/File244080 -Node: Getline/Variable/File245464 -Ref: Getline/Variable/File-Footnote-1247063 -Node: Getline/Pipe247150 -Node: Getline/Variable/Pipe249836 -Node: Getline/Coprocess250943 -Node: Getline/Variable/Coprocess252195 -Node: Getline Notes252932 -Node: Getline Summary255736 -Ref: table-getline-variants256144 -Node: Read Timeout257056 -Ref: Read Timeout-Footnote-1260883 -Node: Command-line directories260941 -Node: Input Summary261845 -Node: Input Exercises264982 -Node: Printing265710 -Node: Print267432 -Node: Print Examples268925 -Node: Output Separators271704 -Node: OFMT273720 -Node: Printf275078 -Node: Basic Printf275984 -Node: Control Letters277523 -Node: Format Modifiers281514 -Node: Printf Examples287541 -Node: Redirection290005 -Node: Special Files296977 -Node: Special FD297510 -Ref: Special FD-Footnote-1301107 -Node: Special Network301181 -Node: Special Caveats302031 -Node: Close Files And Pipes302827 -Ref: Close Files And Pipes-Footnote-1309988 -Ref: Close Files And Pipes-Footnote-2310136 -Node: Output Summary310286 -Node: Output Exercises311283 -Node: Expressions311963 -Node: Values313148 -Node: Constants313824 -Node: Scalar Constants314504 -Ref: Scalar Constants-Footnote-1315363 -Node: Nondecimal-numbers315613 -Node: Regexp Constants318613 -Node: Using Constant Regexps319138 -Node: Variables322210 -Node: Using Variables322865 -Node: Assignment Options324589 -Node: Conversion326464 -Node: Strings And Numbers326988 -Ref: Strings And Numbers-Footnote-1330050 -Node: Locale influences conversions330159 -Ref: table-locale-affects332876 -Node: All Operators333464 -Node: Arithmetic Ops334094 -Node: Concatenation336599 -Ref: Concatenation-Footnote-1339418 -Node: Assignment Ops339524 -Ref: table-assign-ops344507 -Node: Increment Ops345810 -Node: Truth Values and Conditions349248 -Node: Truth Values350331 -Node: Typing and Comparison351380 -Node: Variable Typing352173 -Node: Comparison Operators355825 -Ref: table-relational-ops356235 -Node: POSIX String Comparison359785 -Ref: POSIX String Comparison-Footnote-1360869 -Node: Boolean Ops361007 -Ref: Boolean Ops-Footnote-1365346 -Node: Conditional Exp365437 -Node: Function Calls367164 -Node: Precedence371044 -Node: Locales374713 -Node: Expressions Summary376344 -Node: Patterns and Actions378885 -Node: Pattern Overview380001 -Node: Regexp Patterns381678 -Node: Expression Patterns382221 -Node: Ranges386001 -Node: BEGIN/END389107 -Node: Using BEGIN/END389869 -Ref: Using BEGIN/END-Footnote-1392605 -Node: I/O And BEGIN/END392711 -Node: BEGINFILE/ENDFILE394982 -Node: Empty397913 -Node: Using Shell Variables398230 -Node: Action Overview400513 -Node: Statements402840 -Node: If Statement404688 -Node: While Statement406186 -Node: Do Statement408230 -Node: For Statement409386 -Node: Switch Statement412538 -Node: Break Statement414926 -Node: Continue Statement416967 -Node: Next Statement418792 -Node: Nextfile Statement421182 -Node: Exit Statement423839 -Node: Built-in Variables426243 -Node: User-modified427370 -Ref: User-modified-Footnote-1435059 -Node: Auto-set435121 -Ref: Auto-set-Footnote-1448040 -Ref: Auto-set-Footnote-2448245 -Node: ARGC and ARGV448301 -Node: Pattern Action Summary452205 -Node: Arrays454428 -Node: Array Basics455977 -Node: Array Intro456803 -Ref: figure-array-elements458776 -Ref: Array Intro-Footnote-1461300 -Node: Reference to Elements461428 -Node: Assigning Elements463878 -Node: Array Example464369 -Node: Scanning an Array466101 -Node: Controlling Scanning469102 -Ref: Controlling Scanning-Footnote-1474275 -Node: Delete474591 -Ref: Delete-Footnote-1477342 -Node: Numeric Array Subscripts477399 -Node: Uninitialized Subscripts479582 -Node: Multidimensional481209 -Node: Multiscanning484322 -Node: Arrays of Arrays485911 -Node: Arrays Summary490574 -Node: Functions492679 -Node: Built-in493552 -Node: Calling Built-in494630 -Node: Numeric Functions496618 -Ref: Numeric Functions-Footnote-1501454 -Ref: Numeric Functions-Footnote-2501811 -Ref: Numeric Functions-Footnote-3501859 -Node: String Functions502128 -Ref: String Functions-Footnote-1525125 -Ref: String Functions-Footnote-2525254 -Ref: String Functions-Footnote-3525502 -Node: Gory Details525589 -Ref: table-sub-escapes527362 -Ref: table-sub-proposed528882 -Ref: table-posix-sub530246 -Ref: table-gensub-escapes531786 -Ref: Gory Details-Footnote-1532962 -Node: I/O Functions533113 -Ref: I/O Functions-Footnote-1540223 -Node: Time Functions540370 -Ref: Time Functions-Footnote-1550834 -Ref: Time Functions-Footnote-2550902 -Ref: Time Functions-Footnote-3551060 -Ref: Time Functions-Footnote-4551171 -Ref: Time Functions-Footnote-5551283 -Ref: Time Functions-Footnote-6551510 -Node: Bitwise Functions551776 -Ref: table-bitwise-ops552338 -Ref: Bitwise Functions-Footnote-1556583 -Node: Type Functions556767 -Node: I18N Functions557909 -Node: User-defined559554 -Node: Definition Syntax560358 -Ref: Definition Syntax-Footnote-1565671 -Node: Function Example565740 -Ref: Function Example-Footnote-1568380 -Node: Function Caveats568402 -Node: Calling A Function568920 -Node: Variable Scope569875 -Node: Pass By Value/Reference572863 -Node: Return Statement576373 -Node: Dynamic Typing579357 -Node: Indirect Calls580286 -Node: Functions Summary589999 -Node: Library Functions592538 -Ref: Library Functions-Footnote-1596156 -Ref: Library Functions-Footnote-2596299 -Node: Library Names596470 -Ref: Library Names-Footnote-1599943 -Ref: Library Names-Footnote-2600163 -Node: General Functions600249 -Node: Strtonum Function601277 -Node: Assert Function604151 -Node: Round Function607477 -Node: Cliff Random Function609018 -Node: Ordinal Functions610034 -Ref: Ordinal Functions-Footnote-1613099 -Ref: Ordinal Functions-Footnote-2613351 -Node: Join Function613562 -Ref: Join Function-Footnote-1615333 -Node: Getlocaltime Function615533 -Node: Readfile Function619269 -Ref: Readfile Function-Footnote-1621147 -Node: Data File Management621375 -Node: Filetrans Function622007 -Node: Rewind Function626076 -Node: File Checking627634 -Ref: File Checking-Footnote-1628766 -Node: Empty Files628967 -Node: Ignoring Assigns630946 -Node: Getopt Function632500 -Ref: Getopt Function-Footnote-1643764 -Node: Passwd Functions643967 -Ref: Passwd Functions-Footnote-1652946 -Node: Group Functions653034 -Ref: Group Functions-Footnote-1660965 -Node: Walking Arrays661178 -Node: Library Functions Summary662781 -Node: Library Exercises664169 -Node: Sample Programs665449 -Node: Running Examples666219 -Node: Clones666947 -Node: Cut Program668171 -Node: Egrep Program678029 -Ref: Egrep Program-Footnote-1685616 -Node: Id Program685726 -Node: Split Program689380 -Ref: Split Program-Footnote-1692918 -Node: Tee Program693046 -Node: Uniq Program695833 -Node: Wc Program703254 -Ref: Wc Program-Footnote-1707519 -Node: Miscellaneous Programs707611 -Node: Dupword Program708824 -Node: Alarm Program710855 -Node: Translate Program715659 -Ref: Translate Program-Footnote-1720050 -Ref: Translate Program-Footnote-2720320 -Node: Labels Program720454 -Ref: Labels Program-Footnote-1723815 -Node: Word Sorting723899 -Node: History Sorting727942 -Node: Extract Program729778 -Node: Simple Sed737314 -Node: Igawk Program740376 -Ref: Igawk Program-Footnote-1754680 -Ref: Igawk Program-Footnote-2754881 -Node: Anagram Program755019 -Node: Signature Program758087 -Node: Programs Summary759334 -Node: Programs Exercises760549 -Node: Advanced Features764200 -Node: Nondecimal Data766148 -Node: Array Sorting767725 -Node: Controlling Array Traversal768422 -Node: Array Sorting Functions776702 -Ref: Array Sorting Functions-Footnote-1780609 -Node: Two-way I/O780803 -Ref: Two-way I/O-Footnote-1785747 -Ref: Two-way I/O-Footnote-2785926 -Node: TCP/IP Networking786008 -Node: Profiling788853 -Node: Advanced Features Summary796404 -Node: Internationalization798268 -Node: I18N and L10N799748 -Node: Explaining gettext800434 -Ref: Explaining gettext-Footnote-1805460 -Ref: Explaining gettext-Footnote-2805644 -Node: Programmer i18n805809 -Ref: Programmer i18n-Footnote-1810603 -Node: Translator i18n810652 -Node: String Extraction811446 -Ref: String Extraction-Footnote-1812579 -Node: Printf Ordering812665 -Ref: Printf Ordering-Footnote-1815447 -Node: I18N Portability815511 -Ref: I18N Portability-Footnote-1817960 -Node: I18N Example818023 -Ref: I18N Example-Footnote-1820729 -Node: Gawk I18N820801 -Node: I18N Summary821439 -Node: Debugger822778 -Node: Debugging823800 -Node: Debugging Concepts824241 -Node: Debugging Terms826097 -Node: Awk Debugging828694 -Node: Sample Debugging Session829586 -Node: Debugger Invocation830106 -Node: Finding The Bug831442 -Node: List of Debugger Commands837921 -Node: Breakpoint Control839253 -Node: Debugger Execution Control842917 -Node: Viewing And Changing Data846277 -Node: Execution Stack849635 -Node: Debugger Info851148 -Node: Miscellaneous Debugger Commands855142 -Node: Readline Support860326 -Node: Limitations861218 -Node: Debugging Summary863492 -Node: Arbitrary Precision Arithmetic864660 -Node: Computer Arithmetic866147 -Ref: Computer Arithmetic-Footnote-1870534 -Node: Math Definitions870591 -Ref: table-ieee-formats873880 -Ref: Math Definitions-Footnote-1874420 -Node: MPFR features874523 -Node: FP Math Caution876140 -Ref: FP Math Caution-Footnote-1877190 -Node: Inexactness of computations877559 -Node: Inexact representation878507 -Node: Comparing FP Values879862 -Node: Errors accumulate880826 -Node: Getting Accuracy882259 -Node: Try To Round884918 -Node: Setting precision885817 -Ref: table-predefined-precision-strings886499 -Node: Setting the rounding mode888292 -Ref: table-gawk-rounding-modes888656 -Ref: Setting the rounding mode-Footnote-1892110 -Node: Arbitrary Precision Integers892289 -Ref: Arbitrary Precision Integers-Footnote-1896062 -Node: POSIX Floating Point Problems896211 -Ref: POSIX Floating Point Problems-Footnote-1900087 -Node: Floating point summary900125 -Node: Dynamic Extensions902329 -Node: Extension Intro903881 -Node: Plugin License905146 -Node: Extension Mechanism Outline905831 -Ref: figure-load-extension906255 -Ref: figure-load-new-function907740 -Ref: figure-call-new-function908742 -Node: Extension API Description910726 -Node: Extension API Functions Introduction912176 -Node: General Data Types917043 -Ref: General Data Types-Footnote-1922736 -Node: Requesting Values923035 -Ref: table-value-types-returned923772 -Node: Memory Allocation Functions924730 -Ref: Memory Allocation Functions-Footnote-1927477 -Node: Constructor Functions927573 -Node: Registration Functions929331 -Node: Extension Functions930016 -Node: Exit Callback Functions932318 -Node: Extension Version String933566 -Node: Input Parsers934216 -Node: Output Wrappers944030 -Node: Two-way processors948546 -Node: Printing Messages950750 -Ref: Printing Messages-Footnote-1951827 -Node: Updating `ERRNO'951979 -Node: Accessing Parameters952718 -Node: Symbol Table Access953948 -Node: Symbol table by name954462 -Node: Symbol table by cookie956438 -Ref: Symbol table by cookie-Footnote-1960571 -Node: Cached values960634 -Ref: Cached values-Footnote-1964138 -Node: Array Manipulation964229 -Ref: Array Manipulation-Footnote-1965327 -Node: Array Data Types965366 -Ref: Array Data Types-Footnote-1968069 -Node: Array Functions968161 -Node: Flattening Arrays972035 -Node: Creating Arrays978887 -Node: Extension API Variables983618 -Node: Extension Versioning984254 -Node: Extension API Informational Variables986155 -Node: Extension API Boilerplate987241 -Node: Finding Extensions991045 -Node: Extension Example991605 -Node: Internal File Description992335 -Node: Internal File Ops996426 -Ref: Internal File Ops-Footnote-11007858 -Node: Using Internal File Ops1007998 -Ref: Using Internal File Ops-Footnote-11010345 -Node: Extension Samples1010613 -Node: Extension Sample File Functions1012137 -Node: Extension Sample Fnmatch1019705 -Node: Extension Sample Fork1021187 -Node: Extension Sample Inplace1022400 -Node: Extension Sample Ord1024075 -Node: Extension Sample Readdir1024911 -Ref: table-readdir-file-types1025767 -Node: Extension Sample Revout1026566 -Node: Extension Sample Rev2way1027157 -Node: Extension Sample Read write array1027898 -Node: Extension Sample Readfile1029777 -Node: Extension Sample API Tests1030877 -Node: Extension Sample Time1031402 -Node: gawkextlib1032717 -Node: Extension summary1035530 -Node: Extension Exercises1039223 -Node: Language History1039945 -Node: V7/SVR3.11041588 -Node: SVR41043908 -Node: POSIX1045350 -Node: BTL1046736 -Node: POSIX/GNU1047470 -Node: Feature History1053246 -Node: Common Extensions1066337 -Node: Ranges and Locales1067649 -Ref: Ranges and Locales-Footnote-11072266 -Ref: Ranges and Locales-Footnote-21072293 -Ref: Ranges and Locales-Footnote-31072527 -Node: Contributors1072748 -Node: History summary1078173 -Node: Installation1079542 -Node: Gawk Distribution1080493 -Node: Getting1080977 -Node: Extracting1081801 -Node: Distribution contents1083443 -Node: Unix Installation1089213 -Node: Quick Installation1089830 -Node: Additional Configuration Options1092272 -Node: Configuration Philosophy1094010 -Node: Non-Unix Installation1096361 -Node: PC Installation1096819 -Node: PC Binary Installation1098130 -Node: PC Compiling1099978 -Ref: PC Compiling-Footnote-11102977 -Node: PC Testing1103082 -Node: PC Using1104258 -Node: Cygwin1108410 -Node: MSYS1109219 -Node: VMS Installation1109733 -Node: VMS Compilation1110529 -Ref: VMS Compilation-Footnote-11111751 -Node: VMS Dynamic Extensions1111809 -Node: VMS Installation Details1113182 -Node: VMS Running1115434 -Node: VMS GNV1118268 -Node: VMS Old Gawk1118991 -Node: Bugs1119461 -Node: Other Versions1123465 -Node: Installation summary1129692 -Node: Notes1130748 -Node: Compatibility Mode1131613 -Node: Additions1132395 -Node: Accessing The Source1133320 -Node: Adding Code1134756 -Node: New Ports1140934 -Node: Derived Files1145415 -Ref: Derived Files-Footnote-11150496 -Ref: Derived Files-Footnote-21150530 -Ref: Derived Files-Footnote-31151126 -Node: Future Extensions1151240 -Node: Implementation Limitations1151846 -Node: Extension Design1153094 -Node: Old Extension Problems1154248 -Ref: Old Extension Problems-Footnote-11155765 -Node: Extension New Mechanism Goals1155822 -Ref: Extension New Mechanism Goals-Footnote-11159182 -Node: Extension Other Design Decisions1159371 -Node: Extension Future Growth1161477 -Node: Old Extension Mechanism1162313 -Node: Notes summary1164075 -Node: Basic Concepts1165261 -Node: Basic High Level1165942 -Ref: figure-general-flow1166214 -Ref: figure-process-flow1166813 -Ref: Basic High Level-Footnote-11170042 -Node: Basic Data Typing1170227 -Node: Glossary1173555 -Node: Copying1198707 -Node: GNU Free Documentation License1236263 -Node: Index1261399 +Node: When108250 +Ref: When-Footnote-1110006 +Node: Intro Summary110071 +Node: Invoking Gawk110954 +Node: Command Line112469 +Node: Options113260 +Ref: Options-Footnote-1128907 +Node: Other Arguments128932 +Node: Naming Standard Input131760 +Node: Environment Variables132853 +Node: AWKPATH Variable133411 +Ref: AWKPATH Variable-Footnote-1136277 +Ref: AWKPATH Variable-Footnote-2136322 +Node: AWKLIBPATH Variable136582 +Node: Other Environment Variables137341 +Node: Exit Status140793 +Node: Include Files141468 +Node: Loading Shared Libraries145046 +Node: Obsolete146430 +Node: Undocumented147127 +Node: Invoking Summary147394 +Node: Regexp148994 +Node: Regexp Usage150453 +Node: Escape Sequences152486 +Node: Regexp Operators158557 +Ref: Regexp Operators-Footnote-1165988 +Ref: Regexp Operators-Footnote-2166135 +Node: Bracket Expressions166233 +Ref: table-char-classes168251 +Node: Leftmost Longest171191 +Node: Computed Regexps172395 +Node: GNU Regexp Operators175773 +Node: Case-sensitivity179479 +Ref: Case-sensitivity-Footnote-1182369 +Ref: Case-sensitivity-Footnote-2182604 +Node: Regexp Summary182712 +Node: Reading Files184181 +Node: Records186273 +Node: awk split records186995 +Node: gawk split records191853 +Ref: gawk split records-Footnote-1196374 +Node: Fields196411 +Ref: Fields-Footnote-1199375 +Node: Nonconstant Fields199461 +Ref: Nonconstant Fields-Footnote-1201691 +Node: Changing Fields201893 +Node: Field Separators207847 +Node: Default Field Splitting210549 +Node: Regexp Field Splitting211666 +Node: Single Character Fields214993 +Node: Command Line Field Separator216052 +Node: Full Line Fields219478 +Ref: Full Line Fields-Footnote-1219986 +Node: Field Splitting Summary220032 +Ref: Field Splitting Summary-Footnote-1223164 +Node: Constant Size223265 +Node: Splitting By Content227871 +Ref: Splitting By Content-Footnote-1231944 +Node: Multiple Line231984 +Ref: Multiple Line-Footnote-1237840 +Node: Getline238019 +Node: Plain Getline240230 +Node: Getline/Variable242936 +Node: Getline/File244083 +Node: Getline/Variable/File245467 +Ref: Getline/Variable/File-Footnote-1247066 +Node: Getline/Pipe247153 +Node: Getline/Variable/Pipe249839 +Node: Getline/Coprocess250946 +Node: Getline/Variable/Coprocess252198 +Node: Getline Notes252935 +Node: Getline Summary255739 +Ref: table-getline-variants256147 +Node: Read Timeout257059 +Ref: Read Timeout-Footnote-1260886 +Node: Command-line directories260944 +Node: Input Summary261848 +Node: Input Exercises264985 +Node: Printing265713 +Node: Print267435 +Node: Print Examples268928 +Node: Output Separators271707 +Node: OFMT273723 +Node: Printf275081 +Node: Basic Printf275987 +Node: Control Letters277526 +Node: Format Modifiers281517 +Node: Printf Examples287544 +Node: Redirection290008 +Node: Special Files296980 +Node: Special FD297513 +Ref: Special FD-Footnote-1301110 +Node: Special Network301184 +Node: Special Caveats302034 +Node: Close Files And Pipes302830 +Ref: Close Files And Pipes-Footnote-1309991 +Ref: Close Files And Pipes-Footnote-2310139 +Node: Output Summary310289 +Node: Output Exercises311286 +Node: Expressions311966 +Node: Values313151 +Node: Constants313827 +Node: Scalar Constants314507 +Ref: Scalar Constants-Footnote-1315366 +Node: Nondecimal-numbers315616 +Node: Regexp Constants318616 +Node: Using Constant Regexps319141 +Node: Variables322213 +Node: Using Variables322868 +Node: Assignment Options324592 +Node: Conversion326467 +Node: Strings And Numbers326991 +Ref: Strings And Numbers-Footnote-1330053 +Node: Locale influences conversions330162 +Ref: table-locale-affects332879 +Node: All Operators333467 +Node: Arithmetic Ops334097 +Node: Concatenation336602 +Ref: Concatenation-Footnote-1339421 +Node: Assignment Ops339527 +Ref: table-assign-ops344510 +Node: Increment Ops345813 +Node: Truth Values and Conditions349251 +Node: Truth Values350334 +Node: Typing and Comparison351383 +Node: Variable Typing352176 +Node: Comparison Operators355828 +Ref: table-relational-ops356238 +Node: POSIX String Comparison359788 +Ref: POSIX String Comparison-Footnote-1360872 +Node: Boolean Ops361010 +Ref: Boolean Ops-Footnote-1365349 +Node: Conditional Exp365440 +Node: Function Calls367167 +Node: Precedence371047 +Node: Locales374716 +Node: Expressions Summary376347 +Node: Patterns and Actions378888 +Node: Pattern Overview380004 +Node: Regexp Patterns381681 +Node: Expression Patterns382224 +Node: Ranges386004 +Node: BEGIN/END389110 +Node: Using BEGIN/END389872 +Ref: Using BEGIN/END-Footnote-1392608 +Node: I/O And BEGIN/END392714 +Node: BEGINFILE/ENDFILE394985 +Node: Empty397916 +Node: Using Shell Variables398233 +Node: Action Overview400516 +Node: Statements402843 +Node: If Statement404691 +Node: While Statement406189 +Node: Do Statement408233 +Node: For Statement409389 +Node: Switch Statement412541 +Node: Break Statement414929 +Node: Continue Statement416970 +Node: Next Statement418795 +Node: Nextfile Statement421185 +Node: Exit Statement423842 +Node: Built-in Variables426246 +Node: User-modified427373 +Ref: User-modified-Footnote-1435062 +Node: Auto-set435124 +Ref: Auto-set-Footnote-1448043 +Ref: Auto-set-Footnote-2448248 +Node: ARGC and ARGV448304 +Node: Pattern Action Summary452208 +Node: Arrays454431 +Node: Array Basics455980 +Node: Array Intro456806 +Ref: figure-array-elements458779 +Ref: Array Intro-Footnote-1461303 +Node: Reference to Elements461431 +Node: Assigning Elements463881 +Node: Array Example464372 +Node: Scanning an Array466104 +Node: Controlling Scanning469105 +Ref: Controlling Scanning-Footnote-1474278 +Node: Delete474594 +Ref: Delete-Footnote-1477345 +Node: Numeric Array Subscripts477402 +Node: Uninitialized Subscripts479585 +Node: Multidimensional481212 +Node: Multiscanning484325 +Node: Arrays of Arrays485914 +Node: Arrays Summary490577 +Node: Functions492682 +Node: Built-in493555 +Node: Calling Built-in494633 +Node: Numeric Functions496621 +Ref: Numeric Functions-Footnote-1501457 +Ref: Numeric Functions-Footnote-2501814 +Ref: Numeric Functions-Footnote-3501862 +Node: String Functions502131 +Ref: String Functions-Footnote-1525128 +Ref: String Functions-Footnote-2525257 +Ref: String Functions-Footnote-3525505 +Node: Gory Details525592 +Ref: table-sub-escapes527365 +Ref: table-sub-proposed528885 +Ref: table-posix-sub530249 +Ref: table-gensub-escapes531789 +Ref: Gory Details-Footnote-1532965 +Node: I/O Functions533116 +Ref: I/O Functions-Footnote-1540226 +Node: Time Functions540373 +Ref: Time Functions-Footnote-1550837 +Ref: Time Functions-Footnote-2550905 +Ref: Time Functions-Footnote-3551063 +Ref: Time Functions-Footnote-4551174 +Ref: Time Functions-Footnote-5551286 +Ref: Time Functions-Footnote-6551513 +Node: Bitwise Functions551779 +Ref: table-bitwise-ops552341 +Ref: Bitwise Functions-Footnote-1556586 +Node: Type Functions556770 +Node: I18N Functions557912 +Node: User-defined559557 +Node: Definition Syntax560361 +Ref: Definition Syntax-Footnote-1565674 +Node: Function Example565743 +Ref: Function Example-Footnote-1568383 +Node: Function Caveats568405 +Node: Calling A Function568923 +Node: Variable Scope569878 +Node: Pass By Value/Reference572866 +Node: Return Statement576376 +Node: Dynamic Typing579360 +Node: Indirect Calls580289 +Ref: Indirect Calls-Footnote-1590005 +Node: Functions Summary590133 +Node: Library Functions592783 +Ref: Library Functions-Footnote-1596401 +Ref: Library Functions-Footnote-2596544 +Node: Library Names596715 +Ref: Library Names-Footnote-1600188 +Ref: Library Names-Footnote-2600408 +Node: General Functions600494 +Node: Strtonum Function601522 +Node: Assert Function604396 +Node: Round Function607722 +Node: Cliff Random Function609263 +Node: Ordinal Functions610279 +Ref: Ordinal Functions-Footnote-1613344 +Ref: Ordinal Functions-Footnote-2613596 +Node: Join Function613807 +Ref: Join Function-Footnote-1615578 +Node: Getlocaltime Function615778 +Node: Readfile Function619514 +Node: Data File Management621353 +Node: Filetrans Function621985 +Node: Rewind Function626054 +Node: File Checking627612 +Ref: File Checking-Footnote-1628744 +Node: Empty Files628945 +Node: Ignoring Assigns630924 +Node: Getopt Function632478 +Ref: Getopt Function-Footnote-1643742 +Node: Passwd Functions643945 +Ref: Passwd Functions-Footnote-1652924 +Node: Group Functions653012 +Ref: Group Functions-Footnote-1660943 +Node: Walking Arrays661156 +Node: Library Functions Summary662759 +Node: Library Exercises664147 +Node: Sample Programs665427 +Node: Running Examples666197 +Node: Clones666925 +Node: Cut Program668149 +Node: Egrep Program678007 +Ref: Egrep Program-Footnote-1685594 +Node: Id Program685704 +Node: Split Program689358 +Ref: Split Program-Footnote-1692896 +Node: Tee Program693024 +Node: Uniq Program695811 +Node: Wc Program703234 +Ref: Wc Program-Footnote-1707499 +Node: Miscellaneous Programs707591 +Node: Dupword Program708804 +Node: Alarm Program710835 +Node: Translate Program715639 +Ref: Translate Program-Footnote-1720030 +Ref: Translate Program-Footnote-2720300 +Node: Labels Program720439 +Ref: Labels Program-Footnote-1723800 +Node: Word Sorting723884 +Node: History Sorting727927 +Node: Extract Program729763 +Node: Simple Sed737299 +Node: Igawk Program740361 +Ref: Igawk Program-Footnote-1754665 +Ref: Igawk Program-Footnote-2754866 +Node: Anagram Program755004 +Node: Signature Program758072 +Node: Programs Summary759319 +Node: Programs Exercises760534 +Ref: Programs Exercises-Footnote-1764921 +Node: Advanced Features765012 +Node: Nondecimal Data766960 +Node: Array Sorting768537 +Node: Controlling Array Traversal769234 +Node: Array Sorting Functions777514 +Ref: Array Sorting Functions-Footnote-1781421 +Node: Two-way I/O781615 +Ref: Two-way I/O-Footnote-1786559 +Ref: Two-way I/O-Footnote-2786738 +Node: TCP/IP Networking786820 +Node: Profiling789665 +Node: Advanced Features Summary797216 +Node: Internationalization799080 +Node: I18N and L10N800560 +Node: Explaining gettext801246 +Ref: Explaining gettext-Footnote-1806272 +Ref: Explaining gettext-Footnote-2806456 +Node: Programmer i18n806621 +Ref: Programmer i18n-Footnote-1811415 +Node: Translator i18n811464 +Node: String Extraction812258 +Ref: String Extraction-Footnote-1813391 +Node: Printf Ordering813477 +Ref: Printf Ordering-Footnote-1816259 +Node: I18N Portability816323 +Ref: I18N Portability-Footnote-1818772 +Node: I18N Example818835 +Ref: I18N Example-Footnote-1821541 +Node: Gawk I18N821613 +Node: I18N Summary822251 +Node: Debugger823590 +Node: Debugging824612 +Node: Debugging Concepts825053 +Node: Debugging Terms826909 +Node: Awk Debugging829506 +Node: Sample Debugging Session830398 +Node: Debugger Invocation830918 +Node: Finding The Bug832254 +Node: List of Debugger Commands838733 +Node: Breakpoint Control840065 +Node: Debugger Execution Control843729 +Node: Viewing And Changing Data847089 +Node: Execution Stack850447 +Node: Debugger Info851960 +Node: Miscellaneous Debugger Commands855954 +Node: Readline Support861138 +Node: Limitations862030 +Node: Debugging Summary864303 +Node: Arbitrary Precision Arithmetic865471 +Node: Computer Arithmetic866958 +Ref: Computer Arithmetic-Footnote-1871345 +Node: Math Definitions871402 +Ref: table-ieee-formats874691 +Ref: Math Definitions-Footnote-1875231 +Node: MPFR features875334 +Node: FP Math Caution876951 +Ref: FP Math Caution-Footnote-1878001 +Node: Inexactness of computations878370 +Node: Inexact representation879318 +Node: Comparing FP Values880673 +Node: Errors accumulate881637 +Node: Getting Accuracy883070 +Node: Try To Round885729 +Node: Setting precision886628 +Ref: table-predefined-precision-strings887310 +Node: Setting the rounding mode889103 +Ref: table-gawk-rounding-modes889467 +Ref: Setting the rounding mode-Footnote-1892921 +Node: Arbitrary Precision Integers893100 +Ref: Arbitrary Precision Integers-Footnote-1896873 +Node: POSIX Floating Point Problems897022 +Ref: POSIX Floating Point Problems-Footnote-1900898 +Node: Floating point summary900936 +Node: Dynamic Extensions903140 +Node: Extension Intro904692 +Node: Plugin License905957 +Node: Extension Mechanism Outline906642 +Ref: figure-load-extension907066 +Ref: figure-load-new-function908551 +Ref: figure-call-new-function909553 +Node: Extension API Description911537 +Node: Extension API Functions Introduction912987 +Node: General Data Types917854 +Ref: General Data Types-Footnote-1923547 +Node: Requesting Values923846 +Ref: table-value-types-returned924583 +Node: Memory Allocation Functions925541 +Ref: Memory Allocation Functions-Footnote-1928288 +Node: Constructor Functions928384 +Node: Registration Functions930142 +Node: Extension Functions930827 +Node: Exit Callback Functions933129 +Node: Extension Version String934377 +Node: Input Parsers935027 +Node: Output Wrappers944841 +Node: Two-way processors949357 +Node: Printing Messages951561 +Ref: Printing Messages-Footnote-1952638 +Node: Updating `ERRNO'952790 +Node: Accessing Parameters953529 +Node: Symbol Table Access954759 +Node: Symbol table by name955273 +Node: Symbol table by cookie957249 +Ref: Symbol table by cookie-Footnote-1961382 +Node: Cached values961445 +Ref: Cached values-Footnote-1964949 +Node: Array Manipulation965040 +Ref: Array Manipulation-Footnote-1966138 +Node: Array Data Types966177 +Ref: Array Data Types-Footnote-1968880 +Node: Array Functions968972 +Node: Flattening Arrays972846 +Node: Creating Arrays979698 +Node: Extension API Variables984429 +Node: Extension Versioning985065 +Node: Extension API Informational Variables986966 +Node: Extension API Boilerplate988052 +Node: Finding Extensions991856 +Node: Extension Example992416 +Node: Internal File Description993146 +Node: Internal File Ops997237 +Ref: Internal File Ops-Footnote-11008669 +Node: Using Internal File Ops1008809 +Ref: Using Internal File Ops-Footnote-11011156 +Node: Extension Samples1011424 +Node: Extension Sample File Functions1012948 +Node: Extension Sample Fnmatch1020516 +Node: Extension Sample Fork1021998 +Node: Extension Sample Inplace1023211 +Node: Extension Sample Ord1024886 +Node: Extension Sample Readdir1025722 +Ref: table-readdir-file-types1026578 +Node: Extension Sample Revout1027377 +Node: Extension Sample Rev2way1027968 +Node: Extension Sample Read write array1028709 +Node: Extension Sample Readfile1030588 +Node: Extension Sample API Tests1031688 +Node: Extension Sample Time1032213 +Node: gawkextlib1033528 +Node: Extension summary1036341 +Node: Extension Exercises1040034 +Node: Language History1040756 +Node: V7/SVR3.11042399 +Node: SVR41044719 +Node: POSIX1046161 +Node: BTL1047547 +Node: POSIX/GNU1048281 +Node: Feature History1054057 +Node: Common Extensions1067148 +Node: Ranges and Locales1068460 +Ref: Ranges and Locales-Footnote-11073077 +Ref: Ranges and Locales-Footnote-21073104 +Ref: Ranges and Locales-Footnote-31073338 +Node: Contributors1073559 +Node: History summary1078984 +Node: Installation1080353 +Node: Gawk Distribution1081304 +Node: Getting1081788 +Node: Extracting1082612 +Node: Distribution contents1084254 +Node: Unix Installation1090024 +Node: Quick Installation1090641 +Node: Additional Configuration Options1093083 +Node: Configuration Philosophy1094821 +Node: Non-Unix Installation1097172 +Node: PC Installation1097630 +Node: PC Binary Installation1098941 +Node: PC Compiling1100789 +Ref: PC Compiling-Footnote-11103788 +Node: PC Testing1103893 +Node: PC Using1105069 +Node: Cygwin1109221 +Node: MSYS1110030 +Node: VMS Installation1110544 +Node: VMS Compilation1111340 +Ref: VMS Compilation-Footnote-11112562 +Node: VMS Dynamic Extensions1112620 +Node: VMS Installation Details1113993 +Node: VMS Running1116245 +Node: VMS GNV1119079 +Node: VMS Old Gawk1119802 +Node: Bugs1120272 +Node: Other Versions1124276 +Node: Installation summary1130503 +Node: Notes1131559 +Node: Compatibility Mode1132424 +Node: Additions1133206 +Node: Accessing The Source1134131 +Node: Adding Code1135567 +Node: New Ports1141745 +Node: Derived Files1146226 +Ref: Derived Files-Footnote-11151307 +Ref: Derived Files-Footnote-21151341 +Ref: Derived Files-Footnote-31151937 +Node: Future Extensions1152051 +Node: Implementation Limitations1152657 +Node: Extension Design1153905 +Node: Old Extension Problems1155059 +Ref: Old Extension Problems-Footnote-11156576 +Node: Extension New Mechanism Goals1156633 +Ref: Extension New Mechanism Goals-Footnote-11159993 +Node: Extension Other Design Decisions1160182 +Node: Extension Future Growth1162288 +Node: Old Extension Mechanism1163124 +Node: Notes summary1164886 +Node: Basic Concepts1166072 +Node: Basic High Level1166753 +Ref: figure-general-flow1167025 +Ref: figure-process-flow1167624 +Ref: Basic High Level-Footnote-11170853 +Node: Basic Data Typing1171038 +Node: Glossary1174366 +Node: Copying1199518 +Node: GNU Free Documentation License1237074 +Node: Index1262210 End Tag Table |