From 1b2704c322317629cef59d247e45b3dba3c21992 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 21 Jan 2015 08:44:37 +0200 Subject: More O'Reilly fixes. --- doc/gawk.info | 1161 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 581 insertions(+), 580 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index b81c0700..de004225 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2277,9 +2277,10 @@ built-in functions for working with timestamps, performing bit manipulation, for runtime string translation (internationalization), 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 in *note Built-in::. + As we develop our presentation of the `awk' language, we will +introduce most of the variables and many of the functions. They are +described 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 @@ -2344,7 +2345,7 @@ File: gawk.info, Node: Intro Summary, Prev: When, Up: Getting Started * You may use backslash continuation to continue a source line. Lines are automatically continued after a comma, open brace, - question mark, colon, `||', `&&', `do' and `else'. + question mark, colon, `||', `&&', `do', and `else'.  File: gawk.info, Node: Invoking Gawk, Next: Regexp, Prev: Getting Started, Up: Top @@ -2411,8 +2412,8 @@ File: gawk.info, Node: Options, Next: Other Arguments, Prev: Command Line, U Options begin with a dash and consist of a single character. GNU-style long options consist of two dashes and a keyword. The keyword can be abbreviated, as long as the abbreviation allows the option to be -uniquely identified. If the option takes an argument, then the keyword -is either immediately followed by an equals sign (`=') and the +uniquely identified. If the option takes an argument, either the +keyword is immediately followed by an equals sign (`=') and the argument's value, or the keyword and the argument's value are separated by whitespace. If a particular option with a value is given more than once, it is the last value that counts. @@ -2427,10 +2428,10 @@ The following list describes options mandated by the POSIX standard: `-f SOURCE-FILE' `--file SOURCE-FILE' - Read `awk' program source from SOURCE-FILE instead of in the first - nonoption argument. This option may be given multiple times; the - `awk' program consists of the concatenation of the contents of - each specified SOURCE-FILE. + Read the `awk' program source from SOURCE-FILE instead of in the + first nonoption argument. This option may be given multiple + times; the `awk' program consists of the concatenation of the + contents of each specified SOURCE-FILE. `-v VAR=VAL' `--assign VAR=VAL' @@ -2471,7 +2472,7 @@ The following list describes options mandated by the POSIX standard: `-b' `--characters-as-bytes' Cause `gawk' to treat all input data as single-byte characters. - In addition, all output written with `print' or `printf' are + In addition, all output written with `print' or `printf' is treated as single-byte characters. Normally, `gawk' follows the POSIX standard and attempts to process @@ -2479,7 +2480,7 @@ The following list describes options mandated by the POSIX standard: This can often involve converting multibyte characters into wide characters (internally), and can lead to problems or confusion if the input data does not contain valid multibyte characters. This - option is an easy way to tell `gawk': "hands off my data!". + option is an easy way to tell `gawk', "Hands off my data!" `-c' `--traditional' @@ -2514,7 +2515,7 @@ The following list describes options mandated by the POSIX standard: default, the debugger reads commands interactively from the keyboard (standard input). The optional FILE argument allows you to specify a file with a list of commands for the debugger to - execute non-interactively. No space is allowed between the `-D' + execute noninteractively. No space is allowed between the `-D' and FILE, if FILE is supplied. `-e' PROGRAM-TEXT @@ -2549,23 +2550,23 @@ The following list describes options mandated by the POSIX standard: `-g' `--gen-pot' - Analyze the source program and generate a GNU `gettext' Portable - Object Template file on standard output for all string constants + Analyze the source program and generate a GNU `gettext' portable + object template file on standard output for all string constants that have been marked for translation. *Note Internationalization::, for information about this option. `-h' `--help' - Print a "usage" message summarizing the short and long style + Print a "usage" message summarizing the short- and long-style options that `gawk' accepts and then exit. `-i' SOURCE-FILE `--include' SOURCE-FILE Read an `awk' source library from SOURCE-FILE. This option is completely equivalent to using the `@include' directive inside - your program. This option is very similar to the `-f' option, but - there are two important differences. First, when `-i' is used, - the program source is not loaded if it has been previously loaded, + your program. It is very similar to the `-f' option, but there + are two important differences. First, when `-i' is used, the + program source is not loaded if it has been previously loaded, whereas with `-f', `gawk' always loads the file. Second, because this option is intended to be used with code libraries, `gawk' does not recognize such files as constituting main program input. @@ -2627,15 +2628,15 @@ The following list describes options mandated by the POSIX standard: `-o'[FILE] `--pretty-print'[`='FILE] - Enable pretty-printing of `awk' programs. By default, output + Enable pretty-printing of `awk' programs. By default, the output program is created in a file named `awkprof.out' (*note Profiling::). The optional FILE argument allows you to specify a different file name for the output. No space is allowed between the `-o' and FILE, if FILE is supplied. NOTE: Due to the way `gawk' has evolved, with this option - your program is still executed. This will change in the next - major release such that `gawk' will only pretty-print the + your program still executes. This will change in the next + major release, such that `gawk' will only pretty-print the program and not run it. `-O' @@ -2735,7 +2736,7 @@ input as a source of data.) Because it is clumsy using the standard `awk' mechanisms to mix source file and command-line `awk' programs, `gawk' provides the `-e' -option. This does not require you to pre-empt the standard input for +option. This does not require you to preempt the standard input for your source code; it allows you to easily mix command-line and library source code (*note AWKPATH Variable::). As with `-f', the `-e' and `-i' options may also be used multiple times on the command line. @@ -2894,7 +2895,7 @@ implementations, you must supply a precise pathname for each program file, unless the file is in the current directory. But with `gawk', if the file name supplied to the `-f' or `-i' options does not contain a directory separator `/', then `gawk' searches a list of directories -(called the "search path"), one by one, looking for a file with the +(called the "search path") one by one, looking for a file with the specified name. The search path is a string consisting of directory names separated by @@ -2927,9 +2928,9 @@ or by placing two colons next to each other [`::'].) Different past versions of `gawk' would also look explicitly in the current directory, either before or after the path search. As - of version 4.1.2, this no longer happens, and if you wish to look - in the current directory, you must include `.' either as a separate - entry, or as a null entry in the search path. + of version 4.1.2, this no longer happens; if you wish to look in + the current directory, you must include `.' either as a separate + entry or as a null entry in the search path. The default value for `AWKPATH' is `.:/usr/local/share/awk'.(2) Since `.' is included at the beginning, `gawk' searches first in the @@ -3035,7 +3036,7 @@ change. The variables are: If this variable exists, `gawk' includes the file name and line number within the `gawk' source code from which warning and/or fatal messages are generated. Its purpose is to help isolate the - source of a message, as there are multiple places which produce the + source of a message, as there are multiple places that produce the same warning or error message. `GAWK_NO_DFA' @@ -3058,16 +3059,16 @@ change. The variables are: evaluation stack, when needed. `INT_CHAIN_MAX' - The intended maximum number of items `gawk' will maintain on a - hash chain for managing arrays indexed by integers. + This specifies intended maximum number of items `gawk' will + maintain on a hash chain for managing arrays indexed by integers. `STR_CHAIN_MAX' - The intended maximum number of items `gawk' will maintain on a - hash chain for managing arrays indexed by strings. + This specifies intended maximum number of items `gawk' will + maintain on a hash chain for managing arrays indexed by strings. `TIDYMEM' If this variable exists, `gawk' uses the `mtrace()' library calls - from GNU LIBC to help track down possible memory leaks. + from the GNU C library to help track down possible memory leaks.  File: gawk.info, Node: Exit Status, Next: Include Files, Prev: Environment Variables, Up: Invoking Gawk @@ -3099,11 +3100,11 @@ This minor node describes a feature that is specific to `gawk'. files. This gives you the ability to split large `awk' source files into smaller, more manageable pieces, and also lets you reuse common `awk' code from various `awk' scripts. In other words, you can group -together `awk' functions, used to carry out specific tasks, into -external files. These files can be used just like function libraries, -using the `@include' keyword in conjunction with the `AWKPATH' -environment variable. Note that source files may also be included -using the `-i' option. +together `awk' functions used to carry out specific tasks into external +files. These files can be used just like function libraries, using the +`@include' keyword in conjunction with the `AWKPATH' environment +variable. Note that source files may also be included using the `-i' +option. Let's see an example. We'll start with two (trivial) `awk' scripts, namely `test1' and `test2'. Here is the `test1' script: @@ -3165,11 +3166,11 @@ Variable::) apply to `@include' also. This is very helpful in constructing `gawk' function libraries. If you have a large script with useful, general-purpose `awk' functions, you can break it down into library files and put those files in a -special directory. You can then include those "libraries," using -either the full pathnames of the files, or by setting the `AWKPATH' +special directory. You can then include those "libraries," either by +using the full pathnames of the files, or by setting the `AWKPATH' environment variable accordingly and then using `@include' with just -the file part of the full pathname. Of course, you can have more than -one directory to keep library files; the more complex the working +the file part of the full pathname. Of course, you can keep library +files in more than one directory; the more complex the working environment is, the more directories you may need to organize the files to be included. @@ -3181,8 +3182,8 @@ particular, `@include' is very useful for writing CGI scripts to be run from web pages. As mentioned in *note AWKPATH Variable::, the current directory is -always searched first for source files, before searching in `AWKPATH', -and this also applies to files named with `@include'. +always searched first for source files, before searching in `AWKPATH'; +this also applies to files named with `@include'.  File: gawk.info, Node: Loading Shared Libraries, Next: Obsolete, Prev: Include Files, Up: Invoking Gawk @@ -3227,8 +3228,8 @@ File: gawk.info, Node: Obsolete, Next: Undocumented, Prev: Loading Shared Lib ==================================== This minor node describes features and/or command-line options from -previous releases of `gawk' that are either not available in the -current version or that are still supported but deprecated (meaning that +previous releases of `gawk' that either are not available in the +current version or are still supported but deprecated (meaning that they will _not_ be in the next release). The process-related special files `/dev/pid', `/dev/ppid', @@ -3256,7 +3257,7 @@ File: gawk.info, Node: Invoking Summary, Prev: Undocumented, Up: Invoking Gaw run `awk'. * The three standard options for all versions of `awk' are `-f', - `-F' and `-v'. `gawk' supplies these and many others, as well as + `-F', and `-v'. `gawk' supplies these and many others, as well as corresponding GNU-style long options. * Nonoption command-line arguments are usually treated as file names, @@ -3286,7 +3287,7 @@ File: gawk.info, Node: Invoking Summary, Prev: Undocumented, Up: Invoking Gaw * `gawk' allows you to load additional functions written in C or C++ using the `@load' statement and/or the `-l' option. (This - advanced feature is described later on in *note Dynamic + advanced feature is described later, in *note Dynamic Extensions::.)  @@ -3435,7 +3436,7 @@ sequences apply to both string constants and regexp constants: Horizontal TAB, `Ctrl-i', ASCII code 9 (HT). `\v' - Vertical tab, `Ctrl-k', ASCII code 11 (VT). + Vertical TAB, `Ctrl-k', ASCII code 11 (VT). `\NNN' The octal value NNN, where NNN stands for 1 to 3 digits between @@ -3482,7 +3483,7 @@ normally be a regexp operator. For example, `/a\+b/' matches the three characters `a+b'. For complete portability, do not use a backslash before any -character not shown in the previous list and that is not an operator. +character not shown in the previous list or that is not an operator. Backslash Before Regular Characters @@ -3544,7 +3545,7 @@ and converted into corresponding real characters as the very first step in processing regexps. Here is a list of metacharacters. All characters that are not escape -sequences and that are not listed in the following stand for themselves: +sequences and that are not listed here stand for themselves: `\' This suppresses the special meaning of a character when matching. @@ -3627,7 +3628,7 @@ sequences and that are not listed in the following stand for themselves: There are two subtle points to understand about how `*' works. First, the `*' applies only to the single preceding regular expression component (e.g., in `ph*', it applies just to the `h'). - To cause `*' to apply to a larger sub-expression, use parentheses: + To cause `*' to apply to a larger subexpression, use parentheses: `(ph)*' matches `ph', `phph', `phphph', and so on. Second, `*' finds as many repetitions as possible. If the text to @@ -3658,10 +3659,10 @@ sequences and that are not listed in the following stand for themselves: Matches `whhhy', but not `why' or `whhhhy'. `wh{3,5}y' - Matches `whhhy', `whhhhy', or `whhhhhy', only. + Matches `whhhy', `whhhhy', or `whhhhhy' only. `wh{2,}y' - Matches `whhy' or `whhhy', and so on. + Matches `whhy', `whhhy', and so on. Interval expressions were not traditionally available in `awk'. They were added as part of the POSIX standard to make `awk' and @@ -3763,7 +3764,7 @@ Class Meaning `[:print:]' Printable characters (characters that are not control characters) `[:punct:]' Punctuation characters (characters that are not letters, - digits control characters, or space characters) + digits, control characters, or space characters) `[:space:]' Space characters (such as space, TAB, and formfeed, to name a few) `[:upper:]' Uppercase alphabetic characters @@ -20564,8 +20565,8 @@ File: gawk.info, Node: Gawk I18N, Next: I18N Summary, Prev: I18N Example, Up `gawk' itself has been internationalized using the GNU `gettext' package. (GNU `gettext' is described in complete detail in *note (GNU `gettext' utilities)Top:: gettext, GNU gettext tools.) As of this -writing, the latest version of GNU `gettext' is version 0.19.3 -(ftp://ftp.gnu.org/gnu/gettext/gettext-0.19.3.tar.gz). +writing, the latest version of GNU `gettext' is version 0.19.4 +(ftp://ftp.gnu.org/gnu/gettext/gettext-0.19.4.tar.gz). If a translation of `gawk''s messages exists, then `gawk' produces usage messages, warnings, and fatal errors in the local language. @@ -21922,7 +21923,7 @@ so: $ gawk --version -| GNU Awk 4.1.2, API: 1.1 (GNU MPFR 3.1.0-p3, GNU MP 5.0.2) - -| Copyright (C) 1989, 1991-2014 Free Software Foundation. + -| Copyright (C) 1989, 1991-2015 Free Software Foundation. ... (You may see different version numbers than what's shown here. That's @@ -28270,7 +28271,7 @@ Unix `awk' git clone git://github.com/onetrueawk/awk bwkawk - This command creates a copy of the Git (http://www.git-scm.com) + This command creates a copy of the Git (http://git-scm.com) repository in a directory named `bwkawk'. If you leave that argument off the `git' command line, the repository copy is created in a directory named `awk'. @@ -28502,7 +28503,7 @@ released versions of `gawk'. changes, you will probably wish to work with the development version. To do so, you will need to access the `gawk' source code repository. The code is maintained using the Git distributed version control system -(http://git-scm.com/). You will need to install it if your system +(http://git-scm.com). You will need to install it if your system doesn't have it. Once you have done so, use the command: git clone git://git.savannah.gnu.org/gawk.git @@ -34333,525 +34334,525 @@ Node: More Complex102449 Node: Statements/Lines105311 Ref: Statements/Lines-Footnote-1109766 Node: Other Features110031 -Node: When110962 -Ref: When-Footnote-1112716 -Node: Intro Summary112781 -Node: Invoking Gawk113664 -Node: Command Line115178 -Node: Options115976 -Ref: Options-Footnote-1131909 -Ref: Options-Footnote-2132138 -Node: Other Arguments132163 -Node: Naming Standard Input135111 -Node: Environment Variables136204 -Node: AWKPATH Variable136762 -Ref: AWKPATH Variable-Footnote-1140065 -Ref: AWKPATH Variable-Footnote-2140110 -Node: AWKLIBPATH Variable140370 -Node: Other Environment Variables141513 -Node: Exit Status145241 -Node: Include Files145917 -Node: Loading Shared Libraries149514 -Node: Obsolete150941 -Node: Undocumented151638 -Node: Invoking Summary151905 -Node: Regexp153569 -Node: Regexp Usage155023 -Node: Escape Sequences157060 -Node: Regexp Operators163071 -Ref: Regexp Operators-Footnote-1170497 -Ref: Regexp Operators-Footnote-2170644 -Node: Bracket Expressions170742 -Ref: table-char-classes172757 -Node: Leftmost Longest175681 -Node: Computed Regexps176983 -Node: GNU Regexp Operators180380 -Node: Case-sensitivity184053 -Ref: Case-sensitivity-Footnote-1186938 -Ref: Case-sensitivity-Footnote-2187173 -Node: Regexp Summary187281 -Node: Reading Files188748 -Node: Records190842 -Node: awk split records191575 -Node: gawk split records196490 -Ref: gawk split records-Footnote-1201034 -Node: Fields201071 -Ref: Fields-Footnote-1203847 -Node: Nonconstant Fields203933 -Ref: Nonconstant Fields-Footnote-1206176 -Node: Changing Fields206380 -Node: Field Separators212309 -Node: Default Field Splitting215014 -Node: Regexp Field Splitting216131 -Node: Single Character Fields219481 -Node: Command Line Field Separator220540 -Node: Full Line Fields223752 -Ref: Full Line Fields-Footnote-1225269 -Ref: Full Line Fields-Footnote-2225315 -Node: Field Splitting Summary225416 -Node: Constant Size227490 -Node: Splitting By Content232079 -Ref: Splitting By Content-Footnote-1236073 -Node: Multiple Line236236 -Ref: Multiple Line-Footnote-1242122 -Node: Getline242301 -Node: Plain Getline244513 -Node: Getline/Variable247153 -Node: Getline/File248301 -Node: Getline/Variable/File249685 -Ref: Getline/Variable/File-Footnote-1251288 -Node: Getline/Pipe251375 -Node: Getline/Variable/Pipe254058 -Node: Getline/Coprocess255189 -Node: Getline/Variable/Coprocess256441 -Node: Getline Notes257180 -Node: Getline Summary259972 -Ref: table-getline-variants260384 -Node: Read Timeout261213 -Ref: Read Timeout-Footnote-1265037 -Node: Command-line directories265095 -Node: Input Summary266000 -Node: Input Exercises269301 -Node: Printing270029 -Node: Print271806 -Node: Print Examples273263 -Node: Output Separators276042 -Node: OFMT278060 -Node: Printf279414 -Node: Basic Printf280199 -Node: Control Letters281769 -Node: Format Modifiers285752 -Node: Printf Examples291761 -Node: Redirection294247 -Node: Special FD301088 -Ref: Special FD-Footnote-1304248 -Node: Special Files304322 -Node: Other Inherited Files304939 -Node: Special Network305939 -Node: Special Caveats306801 -Node: Close Files And Pipes307752 -Ref: Close Files And Pipes-Footnote-1314934 -Ref: Close Files And Pipes-Footnote-2315082 -Node: Output Summary315232 -Node: Output Exercises316230 -Node: Expressions316910 -Node: Values318095 -Node: Constants318773 -Node: Scalar Constants319464 -Ref: Scalar Constants-Footnote-1320323 -Node: Nondecimal-numbers320573 -Node: Regexp Constants323591 -Node: Using Constant Regexps324116 -Node: Variables327259 -Node: Using Variables327914 -Node: Assignment Options329825 -Node: Conversion331700 -Node: Strings And Numbers332224 -Ref: Strings And Numbers-Footnote-1335289 -Node: Locale influences conversions335398 -Ref: table-locale-affects338145 -Node: All Operators338733 -Node: Arithmetic Ops339363 -Node: Concatenation341868 -Ref: Concatenation-Footnote-1344687 -Node: Assignment Ops344793 -Ref: table-assign-ops349772 -Node: Increment Ops351044 -Node: Truth Values and Conditions354482 -Node: Truth Values355567 -Node: Typing and Comparison356616 -Node: Variable Typing357426 -Node: Comparison Operators361079 -Ref: table-relational-ops361489 -Node: POSIX String Comparison364984 -Ref: POSIX String Comparison-Footnote-1366056 -Node: Boolean Ops366194 -Ref: Boolean Ops-Footnote-1370673 -Node: Conditional Exp370764 -Node: Function Calls372491 -Node: Precedence376371 -Node: Locales380032 -Node: Expressions Summary381664 -Node: Patterns and Actions384224 -Node: Pattern Overview385344 -Node: Regexp Patterns387023 -Node: Expression Patterns387566 -Node: Ranges391276 -Node: BEGIN/END394382 -Node: Using BEGIN/END395143 -Ref: Using BEGIN/END-Footnote-1397877 -Node: I/O And BEGIN/END397983 -Node: BEGINFILE/ENDFILE400297 -Node: Empty403198 -Node: Using Shell Variables403515 -Node: Action Overview405788 -Node: Statements408114 -Node: If Statement409962 -Node: While Statement411457 -Node: Do Statement413486 -Node: For Statement414630 -Node: Switch Statement417787 -Node: Break Statement420169 -Node: Continue Statement422210 -Node: Next Statement424037 -Node: Nextfile Statement426418 -Node: Exit Statement429048 -Node: Built-in Variables431451 -Node: User-modified432584 -Ref: User-modified-Footnote-1440265 -Node: Auto-set440327 -Ref: Auto-set-Footnote-1453362 -Ref: Auto-set-Footnote-2453567 -Node: ARGC and ARGV453623 -Node: Pattern Action Summary457841 -Node: Arrays460268 -Node: Array Basics461597 -Node: Array Intro462441 -Ref: figure-array-elements464405 -Ref: Array Intro-Footnote-1466931 -Node: Reference to Elements467059 -Node: Assigning Elements469511 -Node: Array Example470002 -Node: Scanning an Array471760 -Node: Controlling Scanning474776 -Ref: Controlling Scanning-Footnote-1479972 -Node: Numeric Array Subscripts480288 -Node: Uninitialized Subscripts482473 -Node: Delete484090 -Ref: Delete-Footnote-1486833 -Node: Multidimensional486890 -Node: Multiscanning489987 -Node: Arrays of Arrays491576 -Node: Arrays Summary496335 -Node: Functions498427 -Node: Built-in499326 -Node: Calling Built-in500404 -Node: Numeric Functions502395 -Ref: Numeric Functions-Footnote-1506412 -Ref: Numeric Functions-Footnote-2506769 -Ref: Numeric Functions-Footnote-3506817 -Node: String Functions507089 -Ref: String Functions-Footnote-1530564 -Ref: String Functions-Footnote-2530693 -Ref: String Functions-Footnote-3530941 -Node: Gory Details531028 -Ref: table-sub-escapes532809 -Ref: table-sub-proposed534329 -Ref: table-posix-sub535693 -Ref: table-gensub-escapes537229 -Ref: Gory Details-Footnote-1538061 -Node: I/O Functions538212 -Ref: I/O Functions-Footnote-1545430 -Node: Time Functions545577 -Ref: Time Functions-Footnote-1556065 -Ref: Time Functions-Footnote-2556133 -Ref: Time Functions-Footnote-3556291 -Ref: Time Functions-Footnote-4556402 -Ref: Time Functions-Footnote-5556514 -Ref: Time Functions-Footnote-6556741 -Node: Bitwise Functions557007 -Ref: table-bitwise-ops557569 -Ref: Bitwise Functions-Footnote-1561878 -Node: Type Functions562047 -Node: I18N Functions563198 -Node: User-defined564843 -Node: Definition Syntax565648 -Ref: Definition Syntax-Footnote-1571055 -Node: Function Example571126 -Ref: Function Example-Footnote-1574045 -Node: Function Caveats574067 -Node: Calling A Function574585 -Node: Variable Scope575543 -Node: Pass By Value/Reference578531 -Node: Return Statement582026 -Node: Dynamic Typing585007 -Node: Indirect Calls585936 -Ref: Indirect Calls-Footnote-1597238 -Node: Functions Summary597366 -Node: Library Functions600068 -Ref: Library Functions-Footnote-1603677 -Ref: Library Functions-Footnote-2603820 -Node: Library Names603991 -Ref: Library Names-Footnote-1607445 -Ref: Library Names-Footnote-2607668 -Node: General Functions607754 -Node: Strtonum Function608857 -Node: Assert Function611879 -Node: Round Function615203 -Node: Cliff Random Function616744 -Node: Ordinal Functions617760 -Ref: Ordinal Functions-Footnote-1620823 -Ref: Ordinal Functions-Footnote-2621075 -Node: Join Function621286 -Ref: Join Function-Footnote-1623055 -Node: Getlocaltime Function623255 -Node: Readfile Function626999 -Node: Shell Quoting628969 -Node: Data File Management630370 -Node: Filetrans Function631002 -Node: Rewind Function635058 -Node: File Checking636445 -Ref: File Checking-Footnote-1637777 -Node: Empty Files637978 -Node: Ignoring Assigns639957 -Node: Getopt Function641508 -Ref: Getopt Function-Footnote-1652970 -Node: Passwd Functions653170 -Ref: Passwd Functions-Footnote-1662007 -Node: Group Functions662095 -Ref: Group Functions-Footnote-1669989 -Node: Walking Arrays670202 -Node: Library Functions Summary671805 -Node: Library Exercises673206 -Node: Sample Programs674486 -Node: Running Examples675256 -Node: Clones675984 -Node: Cut Program677208 -Node: Egrep Program686927 -Ref: Egrep Program-Footnote-1694425 -Node: Id Program694535 -Node: Split Program698180 -Ref: Split Program-Footnote-1701628 -Node: Tee Program701756 -Node: Uniq Program704545 -Node: Wc Program711964 -Ref: Wc Program-Footnote-1716214 -Node: Miscellaneous Programs716308 -Node: Dupword Program717521 -Node: Alarm Program719552 -Node: Translate Program724356 -Ref: Translate Program-Footnote-1728921 -Node: Labels Program729191 -Ref: Labels Program-Footnote-1732542 -Node: Word Sorting732626 -Node: History Sorting736697 -Node: Extract Program738533 -Node: Simple Sed746058 -Node: Igawk Program749126 -Ref: Igawk Program-Footnote-1763450 -Ref: Igawk Program-Footnote-2763651 -Ref: Igawk Program-Footnote-3763773 -Node: Anagram Program763888 -Node: Signature Program766945 -Node: Programs Summary768192 -Node: Programs Exercises769385 -Ref: Programs Exercises-Footnote-1773516 -Node: Advanced Features773607 -Node: Nondecimal Data775555 -Node: Array Sorting777145 -Node: Controlling Array Traversal777842 -Ref: Controlling Array Traversal-Footnote-1786175 -Node: Array Sorting Functions786293 -Ref: Array Sorting Functions-Footnote-1790182 -Node: Two-way I/O790378 -Ref: Two-way I/O-Footnote-1795323 -Ref: Two-way I/O-Footnote-2795509 -Node: TCP/IP Networking795591 -Node: Profiling798464 -Node: Advanced Features Summary806011 -Node: Internationalization807944 -Node: I18N and L10N809424 -Node: Explaining gettext810110 -Ref: Explaining gettext-Footnote-1815135 -Ref: Explaining gettext-Footnote-2815319 -Node: Programmer i18n815484 -Ref: Programmer i18n-Footnote-1820350 -Node: Translator i18n820399 -Node: String Extraction821193 -Ref: String Extraction-Footnote-1822324 -Node: Printf Ordering822410 -Ref: Printf Ordering-Footnote-1825196 -Node: I18N Portability825260 -Ref: I18N Portability-Footnote-1827715 -Node: I18N Example827778 -Ref: I18N Example-Footnote-1830581 -Node: Gawk I18N830653 -Node: I18N Summary831291 -Node: Debugger832630 -Node: Debugging833652 -Node: Debugging Concepts834093 -Node: Debugging Terms835946 -Node: Awk Debugging838518 -Node: Sample Debugging Session839412 -Node: Debugger Invocation839932 -Node: Finding The Bug841316 -Node: List of Debugger Commands847791 -Node: Breakpoint Control849124 -Node: Debugger Execution Control852820 -Node: Viewing And Changing Data856184 -Node: Execution Stack859562 -Node: Debugger Info861199 -Node: Miscellaneous Debugger Commands865216 -Node: Readline Support870245 -Node: Limitations871137 -Node: Debugging Summary873251 -Node: Arbitrary Precision Arithmetic874419 -Node: Computer Arithmetic875835 -Ref: table-numeric-ranges879433 -Ref: Computer Arithmetic-Footnote-1880292 -Node: Math Definitions880349 -Ref: table-ieee-formats883637 -Ref: Math Definitions-Footnote-1884241 -Node: MPFR features884346 -Node: FP Math Caution886017 -Ref: FP Math Caution-Footnote-1887067 -Node: Inexactness of computations887436 -Node: Inexact representation888395 -Node: Comparing FP Values889752 -Node: Errors accumulate890834 -Node: Getting Accuracy892267 -Node: Try To Round894929 -Node: Setting precision895828 -Ref: table-predefined-precision-strings896512 -Node: Setting the rounding mode898301 -Ref: table-gawk-rounding-modes898665 -Ref: Setting the rounding mode-Footnote-1902120 -Node: Arbitrary Precision Integers902299 -Ref: Arbitrary Precision Integers-Footnote-1905285 -Node: POSIX Floating Point Problems905434 -Ref: POSIX Floating Point Problems-Footnote-1909307 -Node: Floating point summary909345 -Node: Dynamic Extensions911539 -Node: Extension Intro913091 -Node: Plugin License914357 -Node: Extension Mechanism Outline915154 -Ref: figure-load-extension915582 -Ref: figure-register-new-function917062 -Ref: figure-call-new-function918066 -Node: Extension API Description920052 -Node: Extension API Functions Introduction921502 -Node: General Data Types926326 -Ref: General Data Types-Footnote-1932065 -Node: Memory Allocation Functions932364 -Ref: Memory Allocation Functions-Footnote-1935203 -Node: Constructor Functions935299 -Node: Registration Functions937033 -Node: Extension Functions937718 -Node: Exit Callback Functions940015 -Node: Extension Version String941263 -Node: Input Parsers941928 -Node: Output Wrappers951807 -Node: Two-way processors956322 -Node: Printing Messages958526 -Ref: Printing Messages-Footnote-1959602 -Node: Updating `ERRNO'959754 -Node: Requesting Values960494 -Ref: table-value-types-returned961222 -Node: Accessing Parameters962179 -Node: Symbol Table Access963410 -Node: Symbol table by name963924 -Node: Symbol table by cookie965905 -Ref: Symbol table by cookie-Footnote-1970049 -Node: Cached values970112 -Ref: Cached values-Footnote-1973611 -Node: Array Manipulation973702 -Ref: Array Manipulation-Footnote-1974800 -Node: Array Data Types974837 -Ref: Array Data Types-Footnote-1977492 -Node: Array Functions977584 -Node: Flattening Arrays981438 -Node: Creating Arrays988330 -Node: Extension API Variables993101 -Node: Extension Versioning993737 -Node: Extension API Informational Variables995638 -Node: Extension API Boilerplate996703 -Node: Finding Extensions1000512 -Node: Extension Example1001072 -Node: Internal File Description1001844 -Node: Internal File Ops1005911 -Ref: Internal File Ops-Footnote-11017581 -Node: Using Internal File Ops1017721 -Ref: Using Internal File Ops-Footnote-11020104 -Node: Extension Samples1020377 -Node: Extension Sample File Functions1021903 -Node: Extension Sample Fnmatch1029541 -Node: Extension Sample Fork1031032 -Node: Extension Sample Inplace1032247 -Node: Extension Sample Ord1033922 -Node: Extension Sample Readdir1034758 -Ref: table-readdir-file-types1035634 -Node: Extension Sample Revout1036445 -Node: Extension Sample Rev2way1037035 -Node: Extension Sample Read write array1037775 -Node: Extension Sample Readfile1039715 -Node: Extension Sample Time1040810 -Node: Extension Sample API Tests1042159 -Node: gawkextlib1042650 -Node: Extension summary1045308 -Node: Extension Exercises1048997 -Node: Language History1049719 -Node: V7/SVR3.11051375 -Node: SVR41053556 -Node: POSIX1055001 -Node: BTL1056390 -Node: POSIX/GNU1057124 -Node: Feature History1062688 -Node: Common Extensions1075786 -Node: Ranges and Locales1077110 -Ref: Ranges and Locales-Footnote-11081728 -Ref: Ranges and Locales-Footnote-21081755 -Ref: Ranges and Locales-Footnote-31081989 -Node: Contributors1082210 -Node: History summary1087751 -Node: Installation1089121 -Node: Gawk Distribution1090067 -Node: Getting1090551 -Node: Extracting1091374 -Node: Distribution contents1093009 -Node: Unix Installation1098726 -Node: Quick Installation1099343 -Node: Additional Configuration Options1101767 -Node: Configuration Philosophy1103505 -Node: Non-Unix Installation1105874 -Node: PC Installation1106332 -Node: PC Binary Installation1107651 -Node: PC Compiling1109499 -Ref: PC Compiling-Footnote-11112520 -Node: PC Testing1112629 -Node: PC Using1113805 -Node: Cygwin1117920 -Node: MSYS1118743 -Node: VMS Installation1119243 -Node: VMS Compilation1120035 -Ref: VMS Compilation-Footnote-11121257 -Node: VMS Dynamic Extensions1121315 -Node: VMS Installation Details1122999 -Node: VMS Running1125251 -Node: VMS GNV1128087 -Node: VMS Old Gawk1128821 -Node: Bugs1129291 -Node: Other Versions1133174 -Node: Installation summary1139602 -Node: Notes1140658 -Node: Compatibility Mode1141523 -Node: Additions1142305 -Node: Accessing The Source1143230 -Node: Adding Code1144666 -Node: New Ports1150831 -Node: Derived Files1155313 -Ref: Derived Files-Footnote-11160788 -Ref: Derived Files-Footnote-21160822 -Ref: Derived Files-Footnote-31161418 -Node: Future Extensions1161532 -Node: Implementation Limitations1162138 -Node: Extension Design1163386 -Node: Old Extension Problems1164540 -Ref: Old Extension Problems-Footnote-11166057 -Node: Extension New Mechanism Goals1166114 -Ref: Extension New Mechanism Goals-Footnote-11169474 -Node: Extension Other Design Decisions1169663 -Node: Extension Future Growth1171771 -Node: Old Extension Mechanism1172607 -Node: Notes summary1174369 -Node: Basic Concepts1175555 -Node: Basic High Level1176236 -Ref: figure-general-flow1176508 -Ref: figure-process-flow1177107 -Ref: Basic High Level-Footnote-11180336 -Node: Basic Data Typing1180521 -Node: Glossary1183849 -Node: Copying1209007 -Node: GNU Free Documentation License1246563 -Node: Index1271699 +Node: When110967 +Ref: When-Footnote-1112721 +Node: Intro Summary112786 +Node: Invoking Gawk113670 +Node: Command Line115184 +Node: Options115982 +Ref: Options-Footnote-1131904 +Ref: Options-Footnote-2132133 +Node: Other Arguments132158 +Node: Naming Standard Input135106 +Node: Environment Variables136199 +Node: AWKPATH Variable136757 +Ref: AWKPATH Variable-Footnote-1140054 +Ref: AWKPATH Variable-Footnote-2140099 +Node: AWKLIBPATH Variable140359 +Node: Other Environment Variables141502 +Node: Exit Status145260 +Node: Include Files145936 +Node: Loading Shared Libraries149525 +Node: Obsolete150952 +Node: Undocumented151644 +Node: Invoking Summary151911 +Node: Regexp153574 +Node: Regexp Usage155028 +Node: Escape Sequences157065 +Node: Regexp Operators163075 +Ref: Regexp Operators-Footnote-1170485 +Ref: Regexp Operators-Footnote-2170632 +Node: Bracket Expressions170730 +Ref: table-char-classes172745 +Node: Leftmost Longest175670 +Node: Computed Regexps176972 +Node: GNU Regexp Operators180369 +Node: Case-sensitivity184042 +Ref: Case-sensitivity-Footnote-1186927 +Ref: Case-sensitivity-Footnote-2187162 +Node: Regexp Summary187270 +Node: Reading Files188737 +Node: Records190831 +Node: awk split records191564 +Node: gawk split records196479 +Ref: gawk split records-Footnote-1201023 +Node: Fields201060 +Ref: Fields-Footnote-1203836 +Node: Nonconstant Fields203922 +Ref: Nonconstant Fields-Footnote-1206165 +Node: Changing Fields206369 +Node: Field Separators212298 +Node: Default Field Splitting215003 +Node: Regexp Field Splitting216120 +Node: Single Character Fields219470 +Node: Command Line Field Separator220529 +Node: Full Line Fields223741 +Ref: Full Line Fields-Footnote-1225258 +Ref: Full Line Fields-Footnote-2225304 +Node: Field Splitting Summary225405 +Node: Constant Size227479 +Node: Splitting By Content232068 +Ref: Splitting By Content-Footnote-1236062 +Node: Multiple Line236225 +Ref: Multiple Line-Footnote-1242111 +Node: Getline242290 +Node: Plain Getline244502 +Node: Getline/Variable247142 +Node: Getline/File248290 +Node: Getline/Variable/File249674 +Ref: Getline/Variable/File-Footnote-1251277 +Node: Getline/Pipe251364 +Node: Getline/Variable/Pipe254047 +Node: Getline/Coprocess255178 +Node: Getline/Variable/Coprocess256430 +Node: Getline Notes257169 +Node: Getline Summary259961 +Ref: table-getline-variants260373 +Node: Read Timeout261202 +Ref: Read Timeout-Footnote-1265026 +Node: Command-line directories265084 +Node: Input Summary265989 +Node: Input Exercises269290 +Node: Printing270018 +Node: Print271795 +Node: Print Examples273252 +Node: Output Separators276031 +Node: OFMT278049 +Node: Printf279403 +Node: Basic Printf280188 +Node: Control Letters281758 +Node: Format Modifiers285741 +Node: Printf Examples291750 +Node: Redirection294236 +Node: Special FD301077 +Ref: Special FD-Footnote-1304237 +Node: Special Files304311 +Node: Other Inherited Files304928 +Node: Special Network305928 +Node: Special Caveats306790 +Node: Close Files And Pipes307741 +Ref: Close Files And Pipes-Footnote-1314923 +Ref: Close Files And Pipes-Footnote-2315071 +Node: Output Summary315221 +Node: Output Exercises316219 +Node: Expressions316899 +Node: Values318084 +Node: Constants318762 +Node: Scalar Constants319453 +Ref: Scalar Constants-Footnote-1320312 +Node: Nondecimal-numbers320562 +Node: Regexp Constants323580 +Node: Using Constant Regexps324105 +Node: Variables327248 +Node: Using Variables327903 +Node: Assignment Options329814 +Node: Conversion331689 +Node: Strings And Numbers332213 +Ref: Strings And Numbers-Footnote-1335278 +Node: Locale influences conversions335387 +Ref: table-locale-affects338134 +Node: All Operators338722 +Node: Arithmetic Ops339352 +Node: Concatenation341857 +Ref: Concatenation-Footnote-1344676 +Node: Assignment Ops344782 +Ref: table-assign-ops349761 +Node: Increment Ops351033 +Node: Truth Values and Conditions354471 +Node: Truth Values355556 +Node: Typing and Comparison356605 +Node: Variable Typing357415 +Node: Comparison Operators361068 +Ref: table-relational-ops361478 +Node: POSIX String Comparison364973 +Ref: POSIX String Comparison-Footnote-1366045 +Node: Boolean Ops366183 +Ref: Boolean Ops-Footnote-1370662 +Node: Conditional Exp370753 +Node: Function Calls372480 +Node: Precedence376360 +Node: Locales380021 +Node: Expressions Summary381653 +Node: Patterns and Actions384213 +Node: Pattern Overview385333 +Node: Regexp Patterns387012 +Node: Expression Patterns387555 +Node: Ranges391265 +Node: BEGIN/END394371 +Node: Using BEGIN/END395132 +Ref: Using BEGIN/END-Footnote-1397866 +Node: I/O And BEGIN/END397972 +Node: BEGINFILE/ENDFILE400286 +Node: Empty403187 +Node: Using Shell Variables403504 +Node: Action Overview405777 +Node: Statements408103 +Node: If Statement409951 +Node: While Statement411446 +Node: Do Statement413475 +Node: For Statement414619 +Node: Switch Statement417776 +Node: Break Statement420158 +Node: Continue Statement422199 +Node: Next Statement424026 +Node: Nextfile Statement426407 +Node: Exit Statement429037 +Node: Built-in Variables431440 +Node: User-modified432573 +Ref: User-modified-Footnote-1440254 +Node: Auto-set440316 +Ref: Auto-set-Footnote-1453351 +Ref: Auto-set-Footnote-2453556 +Node: ARGC and ARGV453612 +Node: Pattern Action Summary457830 +Node: Arrays460257 +Node: Array Basics461586 +Node: Array Intro462430 +Ref: figure-array-elements464394 +Ref: Array Intro-Footnote-1466920 +Node: Reference to Elements467048 +Node: Assigning Elements469500 +Node: Array Example469991 +Node: Scanning an Array471749 +Node: Controlling Scanning474765 +Ref: Controlling Scanning-Footnote-1479961 +Node: Numeric Array Subscripts480277 +Node: Uninitialized Subscripts482462 +Node: Delete484079 +Ref: Delete-Footnote-1486822 +Node: Multidimensional486879 +Node: Multiscanning489976 +Node: Arrays of Arrays491565 +Node: Arrays Summary496324 +Node: Functions498416 +Node: Built-in499315 +Node: Calling Built-in500393 +Node: Numeric Functions502384 +Ref: Numeric Functions-Footnote-1506401 +Ref: Numeric Functions-Footnote-2506758 +Ref: Numeric Functions-Footnote-3506806 +Node: String Functions507078 +Ref: String Functions-Footnote-1530553 +Ref: String Functions-Footnote-2530682 +Ref: String Functions-Footnote-3530930 +Node: Gory Details531017 +Ref: table-sub-escapes532798 +Ref: table-sub-proposed534318 +Ref: table-posix-sub535682 +Ref: table-gensub-escapes537218 +Ref: Gory Details-Footnote-1538050 +Node: I/O Functions538201 +Ref: I/O Functions-Footnote-1545419 +Node: Time Functions545566 +Ref: Time Functions-Footnote-1556054 +Ref: Time Functions-Footnote-2556122 +Ref: Time Functions-Footnote-3556280 +Ref: Time Functions-Footnote-4556391 +Ref: Time Functions-Footnote-5556503 +Ref: Time Functions-Footnote-6556730 +Node: Bitwise Functions556996 +Ref: table-bitwise-ops557558 +Ref: Bitwise Functions-Footnote-1561867 +Node: Type Functions562036 +Node: I18N Functions563187 +Node: User-defined564832 +Node: Definition Syntax565637 +Ref: Definition Syntax-Footnote-1571044 +Node: Function Example571115 +Ref: Function Example-Footnote-1574034 +Node: Function Caveats574056 +Node: Calling A Function574574 +Node: Variable Scope575532 +Node: Pass By Value/Reference578520 +Node: Return Statement582015 +Node: Dynamic Typing584996 +Node: Indirect Calls585925 +Ref: Indirect Calls-Footnote-1597227 +Node: Functions Summary597355 +Node: Library Functions600057 +Ref: Library Functions-Footnote-1603666 +Ref: Library Functions-Footnote-2603809 +Node: Library Names603980 +Ref: Library Names-Footnote-1607434 +Ref: Library Names-Footnote-2607657 +Node: General Functions607743 +Node: Strtonum Function608846 +Node: Assert Function611868 +Node: Round Function615192 +Node: Cliff Random Function616733 +Node: Ordinal Functions617749 +Ref: Ordinal Functions-Footnote-1620812 +Ref: Ordinal Functions-Footnote-2621064 +Node: Join Function621275 +Ref: Join Function-Footnote-1623044 +Node: Getlocaltime Function623244 +Node: Readfile Function626988 +Node: Shell Quoting628958 +Node: Data File Management630359 +Node: Filetrans Function630991 +Node: Rewind Function635047 +Node: File Checking636434 +Ref: File Checking-Footnote-1637766 +Node: Empty Files637967 +Node: Ignoring Assigns639946 +Node: Getopt Function641497 +Ref: Getopt Function-Footnote-1652959 +Node: Passwd Functions653159 +Ref: Passwd Functions-Footnote-1661996 +Node: Group Functions662084 +Ref: Group Functions-Footnote-1669978 +Node: Walking Arrays670191 +Node: Library Functions Summary671794 +Node: Library Exercises673195 +Node: Sample Programs674475 +Node: Running Examples675245 +Node: Clones675973 +Node: Cut Program677197 +Node: Egrep Program686916 +Ref: Egrep Program-Footnote-1694414 +Node: Id Program694524 +Node: Split Program698169 +Ref: Split Program-Footnote-1701617 +Node: Tee Program701745 +Node: Uniq Program704534 +Node: Wc Program711953 +Ref: Wc Program-Footnote-1716203 +Node: Miscellaneous Programs716297 +Node: Dupword Program717510 +Node: Alarm Program719541 +Node: Translate Program724345 +Ref: Translate Program-Footnote-1728910 +Node: Labels Program729180 +Ref: Labels Program-Footnote-1732531 +Node: Word Sorting732615 +Node: History Sorting736686 +Node: Extract Program738522 +Node: Simple Sed746047 +Node: Igawk Program749115 +Ref: Igawk Program-Footnote-1763439 +Ref: Igawk Program-Footnote-2763640 +Ref: Igawk Program-Footnote-3763762 +Node: Anagram Program763877 +Node: Signature Program766934 +Node: Programs Summary768181 +Node: Programs Exercises769374 +Ref: Programs Exercises-Footnote-1773505 +Node: Advanced Features773596 +Node: Nondecimal Data775544 +Node: Array Sorting777134 +Node: Controlling Array Traversal777831 +Ref: Controlling Array Traversal-Footnote-1786164 +Node: Array Sorting Functions786282 +Ref: Array Sorting Functions-Footnote-1790171 +Node: Two-way I/O790367 +Ref: Two-way I/O-Footnote-1795312 +Ref: Two-way I/O-Footnote-2795498 +Node: TCP/IP Networking795580 +Node: Profiling798453 +Node: Advanced Features Summary806000 +Node: Internationalization807933 +Node: I18N and L10N809413 +Node: Explaining gettext810099 +Ref: Explaining gettext-Footnote-1815124 +Ref: Explaining gettext-Footnote-2815308 +Node: Programmer i18n815473 +Ref: Programmer i18n-Footnote-1820339 +Node: Translator i18n820388 +Node: String Extraction821182 +Ref: String Extraction-Footnote-1822313 +Node: Printf Ordering822399 +Ref: Printf Ordering-Footnote-1825185 +Node: I18N Portability825249 +Ref: I18N Portability-Footnote-1827704 +Node: I18N Example827767 +Ref: I18N Example-Footnote-1830570 +Node: Gawk I18N830642 +Node: I18N Summary831280 +Node: Debugger832619 +Node: Debugging833641 +Node: Debugging Concepts834082 +Node: Debugging Terms835935 +Node: Awk Debugging838507 +Node: Sample Debugging Session839401 +Node: Debugger Invocation839921 +Node: Finding The Bug841305 +Node: List of Debugger Commands847780 +Node: Breakpoint Control849113 +Node: Debugger Execution Control852809 +Node: Viewing And Changing Data856173 +Node: Execution Stack859551 +Node: Debugger Info861188 +Node: Miscellaneous Debugger Commands865205 +Node: Readline Support870234 +Node: Limitations871126 +Node: Debugging Summary873240 +Node: Arbitrary Precision Arithmetic874408 +Node: Computer Arithmetic875824 +Ref: table-numeric-ranges879422 +Ref: Computer Arithmetic-Footnote-1880281 +Node: Math Definitions880338 +Ref: table-ieee-formats883626 +Ref: Math Definitions-Footnote-1884230 +Node: MPFR features884335 +Node: FP Math Caution886006 +Ref: FP Math Caution-Footnote-1887056 +Node: Inexactness of computations887425 +Node: Inexact representation888384 +Node: Comparing FP Values889741 +Node: Errors accumulate890823 +Node: Getting Accuracy892256 +Node: Try To Round894918 +Node: Setting precision895817 +Ref: table-predefined-precision-strings896501 +Node: Setting the rounding mode898290 +Ref: table-gawk-rounding-modes898654 +Ref: Setting the rounding mode-Footnote-1902109 +Node: Arbitrary Precision Integers902288 +Ref: Arbitrary Precision Integers-Footnote-1905274 +Node: POSIX Floating Point Problems905423 +Ref: POSIX Floating Point Problems-Footnote-1909296 +Node: Floating point summary909334 +Node: Dynamic Extensions911528 +Node: Extension Intro913080 +Node: Plugin License914346 +Node: Extension Mechanism Outline915143 +Ref: figure-load-extension915571 +Ref: figure-register-new-function917051 +Ref: figure-call-new-function918055 +Node: Extension API Description920041 +Node: Extension API Functions Introduction921491 +Node: General Data Types926315 +Ref: General Data Types-Footnote-1932054 +Node: Memory Allocation Functions932353 +Ref: Memory Allocation Functions-Footnote-1935192 +Node: Constructor Functions935288 +Node: Registration Functions937022 +Node: Extension Functions937707 +Node: Exit Callback Functions940004 +Node: Extension Version String941252 +Node: Input Parsers941917 +Node: Output Wrappers951796 +Node: Two-way processors956311 +Node: Printing Messages958515 +Ref: Printing Messages-Footnote-1959591 +Node: Updating `ERRNO'959743 +Node: Requesting Values960483 +Ref: table-value-types-returned961211 +Node: Accessing Parameters962168 +Node: Symbol Table Access963399 +Node: Symbol table by name963913 +Node: Symbol table by cookie965894 +Ref: Symbol table by cookie-Footnote-1970038 +Node: Cached values970101 +Ref: Cached values-Footnote-1973600 +Node: Array Manipulation973691 +Ref: Array Manipulation-Footnote-1974789 +Node: Array Data Types974826 +Ref: Array Data Types-Footnote-1977481 +Node: Array Functions977573 +Node: Flattening Arrays981427 +Node: Creating Arrays988319 +Node: Extension API Variables993090 +Node: Extension Versioning993726 +Node: Extension API Informational Variables995627 +Node: Extension API Boilerplate996692 +Node: Finding Extensions1000501 +Node: Extension Example1001061 +Node: Internal File Description1001833 +Node: Internal File Ops1005900 +Ref: Internal File Ops-Footnote-11017570 +Node: Using Internal File Ops1017710 +Ref: Using Internal File Ops-Footnote-11020093 +Node: Extension Samples1020366 +Node: Extension Sample File Functions1021892 +Node: Extension Sample Fnmatch1029530 +Node: Extension Sample Fork1031021 +Node: Extension Sample Inplace1032236 +Node: Extension Sample Ord1033911 +Node: Extension Sample Readdir1034747 +Ref: table-readdir-file-types1035623 +Node: Extension Sample Revout1036434 +Node: Extension Sample Rev2way1037024 +Node: Extension Sample Read write array1037764 +Node: Extension Sample Readfile1039704 +Node: Extension Sample Time1040799 +Node: Extension Sample API Tests1042148 +Node: gawkextlib1042639 +Node: Extension summary1045297 +Node: Extension Exercises1048986 +Node: Language History1049708 +Node: V7/SVR3.11051364 +Node: SVR41053545 +Node: POSIX1054990 +Node: BTL1056379 +Node: POSIX/GNU1057113 +Node: Feature History1062677 +Node: Common Extensions1075775 +Node: Ranges and Locales1077099 +Ref: Ranges and Locales-Footnote-11081717 +Ref: Ranges and Locales-Footnote-21081744 +Ref: Ranges and Locales-Footnote-31081978 +Node: Contributors1082199 +Node: History summary1087740 +Node: Installation1089110 +Node: Gawk Distribution1090056 +Node: Getting1090540 +Node: Extracting1091363 +Node: Distribution contents1092998 +Node: Unix Installation1098715 +Node: Quick Installation1099332 +Node: Additional Configuration Options1101756 +Node: Configuration Philosophy1103494 +Node: Non-Unix Installation1105863 +Node: PC Installation1106321 +Node: PC Binary Installation1107640 +Node: PC Compiling1109488 +Ref: PC Compiling-Footnote-11112509 +Node: PC Testing1112618 +Node: PC Using1113794 +Node: Cygwin1117909 +Node: MSYS1118732 +Node: VMS Installation1119232 +Node: VMS Compilation1120024 +Ref: VMS Compilation-Footnote-11121246 +Node: VMS Dynamic Extensions1121304 +Node: VMS Installation Details1122988 +Node: VMS Running1125240 +Node: VMS GNV1128076 +Node: VMS Old Gawk1128810 +Node: Bugs1129280 +Node: Other Versions1133163 +Node: Installation summary1139587 +Node: Notes1140643 +Node: Compatibility Mode1141508 +Node: Additions1142290 +Node: Accessing The Source1143215 +Node: Adding Code1144650 +Node: New Ports1150815 +Node: Derived Files1155297 +Ref: Derived Files-Footnote-11160772 +Ref: Derived Files-Footnote-21160806 +Ref: Derived Files-Footnote-31161402 +Node: Future Extensions1161516 +Node: Implementation Limitations1162122 +Node: Extension Design1163370 +Node: Old Extension Problems1164524 +Ref: Old Extension Problems-Footnote-11166041 +Node: Extension New Mechanism Goals1166098 +Ref: Extension New Mechanism Goals-Footnote-11169458 +Node: Extension Other Design Decisions1169647 +Node: Extension Future Growth1171755 +Node: Old Extension Mechanism1172591 +Node: Notes summary1174353 +Node: Basic Concepts1175539 +Node: Basic High Level1176220 +Ref: figure-general-flow1176492 +Ref: figure-process-flow1177091 +Ref: Basic High Level-Footnote-11180320 +Node: Basic Data Typing1180505 +Node: Glossary1183833 +Node: Copying1208991 +Node: GNU Free Documentation License1246547 +Node: Index1271683  End Tag Table -- cgit v1.2.3 From 6f220759af1c8e37f56acd334a295daa8c4a2651 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 23 Jan 2015 13:04:09 +0200 Subject: More O'Reilly fixes. --- doc/gawk.info | 1289 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 646 insertions(+), 643 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index de004225..2a17cbcf 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -3802,8 +3802,9 @@ Collating symbols Equivalence classes Locale-specific names for a list of characters that are equal. The name is enclosed between `[=' and `=]'. For example, the name `e' - might be used to represent all of "e," "e`," and "e'." In this - case, `[[=e=]]' is a regexp that matches any of `e', `e'', or `e`'. + might be used to represent all of "e," "e^," "e`," and "e'." In + this case, `[[=e=]]' is a regexp that matches any of `e', `e^', + `e'', or `e`'. These features are very valuable in non-English-speaking locales. @@ -3825,7 +3826,7 @@ Consider the following: This example uses the `sub()' function to make a change to the input record. (`sub()' replaces the first instance of any text matched by the first argument with the string provided as the second argument; -*note String Functions::). Here, the regexp `/a+/' indicates "one or +*note String Functions::.) Here, the regexp `/a+/' indicates "one or more `a' characters," and the replacement text is `'. The input contains four `a' characters. `awk' (and POSIX) regular @@ -3862,15 +3863,16 @@ regexp": This sets `digits_regexp' to a regexp that describes one or more digits, and tests whether the input record matches this regexp. - NOTE: When using the `~' and `!~' operators, there is a difference - between a regexp constant enclosed in slashes and a string - constant enclosed in double quotes. If you are going to use a - string constant, you have to understand that the string is, in - essence, scanned _twice_: the first time when `awk' reads your + NOTE: When using the `~' and `!~' operators, be aware that there + is a difference between a regexp constant enclosed in slashes and + a string constant enclosed in double quotes. If you are going to + use a string constant, you have to understand that the string is, + in essence, scanned _twice_: the first time when `awk' reads your program, and the second time when it goes to match the string on the lefthand side of the operator with the pattern on the right. This is true of any string-valued expression (such as - `digits_regexp', shown previously), not just string constants. + `digits_regexp', shown in the previous example), not just string + constants. What difference does it make if the string is scanned twice? The answer has to do with escape sequences, and particularly with @@ -3967,7 +3969,7 @@ letters, digits, or underscores (`_'): `\B' Matches the empty string that occurs between two word-constituent - characters. For example, `/\Brat\B/' matches `crate' but it does + characters. For example, `/\Brat\B/' matches `crate', but it does not match `dirty rat'. `\B' is essentially the opposite of `\y'. There are two other operators that work on buffers. In Emacs, a @@ -3976,10 +3978,10 @@ letters, digits, or underscores (`_'): operators are: `\`' - Matches the empty string at the beginning of a buffer (string). + Matches the empty string at the beginning of a buffer (string) `\'' - Matches the empty string at the end of a buffer (string). + Matches the empty string at the end of a buffer (string) Because `^' and `$' always work in terms of the beginning and end of strings, these operators don't add any new capabilities for `awk'. @@ -4150,7 +4152,7 @@ one line. Each record is automatically split into chunks called parts of a record. On rare occasions, you may need to use the `getline' command. The -`getline' command is valuable, both because it can do explicit input +`getline' command is valuable both because it can do explicit input from any number of files, and because the files used with it do not have to be named on the `awk' command line (*note Getline::). @@ -4199,8 +4201,8 @@ File: gawk.info, Node: awk split records, Next: gawk split records, Up: Recor Records are separated by a character called the "record separator". By default, the record separator is the newline character. This is why -records are, by default, single lines. A different character can be -used for the record separator by assigning the character to the +records are, by default, single lines. To use a different character +for the record separator, simply assign that character to the predefined variable `RS'. Like any other variable, the value of `RS' can be changed in the @@ -4215,14 +4217,14 @@ BEGIN/END::). For example: awk 'BEGIN { RS = "u" } { print $0 }' mail-list -changes the value of `RS' to `u', before reading any input. This is a -string whose first character is the letter "u"; as a result, records -are separated by the letter "u." Then the input file is read, and the -second rule in the `awk' program (the action with no pattern) prints -each record. Because each `print' statement adds a newline at the end -of its output, this `awk' program copies the input with each `u' -changed to a newline. Here are the results of running the program on -`mail-list': +changes the value of `RS' to `u', before reading any input. The new +value is a string whose first character is the letter "u"; as a result, +records are separated by the letter "u". Then the input file is read, +and the second rule in the `awk' program (the action with no pattern) +prints each record. Because each `print' statement adds a newline at +the end of its output, this `awk' program copies the input with each +`u' changed to a newline. Here are the results of running the program +on `mail-list': $ awk 'BEGIN { RS = "u" } > { print $0 }' mail-list @@ -4270,11 +4272,11 @@ data file (*note Sample Data Files::), the line looks like this: Bill 555-1675 bill.drowning@hotmail.com A -It contains no `u' so there is no reason to split the record, unlike -the others which have one or more occurrences of the `u'. In fact, -this record is treated as part of the previous record; the newline -separating them in the output is the original newline in the data file, -not the one added by `awk' when it printed the record! +It contains no `u', so there is no reason to split the record, unlike +the others, which each have one or more occurrences of the `u'. In +fact, this record is treated as part of the previous record; the +newline separating them in the output is the original newline in the +data file, not the one added by `awk' when it printed the record! Another way to change the record separator is on the command line, using the variable-assignment feature (*note Other Arguments::): @@ -4340,8 +4342,8 @@ part of either record. character. However, when `RS' is a regular expression, `RT' contains the actual input text that matched the regular expression. - If the input file ended without any text that matches `RS', `gawk' -sets `RT' to the null string. + If the input file ends without any text matching `RS', `gawk' sets +`RT' to the null string. The following example illustrates both of these features. It sets `RS' equal to a regular expression that matches either a newline or a @@ -4439,12 +4441,12 @@ to these pieces of the record. You don't have to use them--you can operate on the whole record if you want--but fields are what make simple `awk' programs so powerful. - You use a dollar-sign (`$') to refer to a field in an `awk' program, + You use a dollar sign (`$') to refer to a field in an `awk' program, followed by the number of the field you want. Thus, `$1' refers to the -first field, `$2' to the second, and so on. (Unlike the Unix shells, -the field numbers are not limited to single digits. `$127' is the -127th field in the record.) For example, suppose the following is a -line of input: +first field, `$2' to the second, and so on. (Unlike in the Unix +shells, the field numbers are not limited to single digits. `$127' is +the 127th field in the record.) For example, suppose the following is +a line of input: This seems like a pretty nice example. @@ -4461,10 +4463,9 @@ as `$7', which is `example.'. If you try to reference a field beyond the last one (such as `$8' when the record has only seven fields), you get the empty string. (If used in a numeric operation, you get zero.) - The use of `$0', which looks like a reference to the "zero-th" -field, is a special case: it represents the whole input record. Use it -when you are not interested in specific fields. Here are some more -examples: + The use of `$0', which looks like a reference to the "zeroth" field, +is a special case: it represents the whole input record. Use it when +you are not interested in specific fields. Here are some more examples: $ awk '$1 ~ /li/ { print $0 }' mail-list -| Amelia 555-5553 amelia.zodiacusque@gmail.com F @@ -4512,8 +4513,8 @@ is another example of using expressions as field numbers: awk '{ print $(2*2) }' mail-list `awk' evaluates the expression `(2*2)' and uses its value as the -number of the field to print. The `*' sign represents multiplication, -so the expression `2*2' evaluates to four. The parentheses are used so +number of the field to print. The `*' represents multiplication, so +the expression `2*2' evaluates to four. The parentheses are used so that the multiplication is done before the `$' operation; they are necessary whenever there is a binary operator(1) in the field-number expression. This example, then, prints the type of relationship (the @@ -4537,7 +4538,7 @@ field number. ---------- Footnotes ---------- (1) A "binary operator", such as `*' for multiplication, is one that -takes two operands. The distinction is required, because `awk' also has +takes two operands. The distinction is required because `awk' also has unary (one-operand) and ternary (three-operand) operators.  @@ -4659,7 +4660,7 @@ value of `NF' and recomputes `$0'. (d.c.) Here is an example: decremented. Finally, there are times when it is convenient to force `awk' to -rebuild the entire record, using the current value of the fields and +rebuild the entire record, using the current values of the fields and `OFS'. To do this, use the seemingly innocuous assignment: $1 = $1 # force record to be reconstituted @@ -4679,7 +4680,7 @@ built-in function that updates `$0', such as `sub()' and `gsub()' It is important to remember that `$0' is the _full_ record, exactly as it was read from the input. This includes any leading or trailing whitespace, and the exact whitespace (or other characters) that -separate the fields. +separates the fields. It is a common error to try to change the field separators in a record simply by setting `FS' and `OFS', and then expecting a plain @@ -4747,7 +4748,7 @@ attached, such as: John Q. Smith, LXIX, 29 Oak St., Walamazoo, MI 42139 -The same program would extract `*LXIX', instead of `*29*Oak*St.'. If +The same program would extract `*LXIX' instead of `*29*Oak*St.'. If you were expecting the program to print the address, you would be surprised. The moral is to choose your data layout and separator characters carefully to prevent such problems. (If the data is not in @@ -4946,11 +4947,11 @@ your field and record separators. Perhaps the most common use of a single character as the field separator occurs when processing the Unix system password file. On many Unix systems, each user has a separate entry in the system -password file, one line per user. The information in these lines is -separated by colons. The first field is the user's login name and the -second is the user's encrypted or shadow password. (A shadow password -is indicated by the presence of a single `x' in the second field.) A -password file entry might look like this: +password file, with one line per user. The information in these lines +is separated by colons. The first field is the user's login name and +the second is the user's encrypted or shadow password. (A shadow +password is indicated by the presence of a single `x' in the second +field.) A password file entry might look like this: arnold:x:2076:10:Arnold Robbins:/home/arnold:/bin/bash @@ -4978,15 +4979,14 @@ When you do this, `$1' is the same as `$0'. According to the POSIX standard, `awk' is supposed to behave as if each record is split into fields at the time it is read. In particular, this means that if you change the value of `FS' after a -record is read, the value of the fields (i.e., how they were split) +record is read, the values of the fields (i.e., how they were split) should reflect the old value of `FS', not the new one. However, many older implementations of `awk' do not work this way. Instead, they defer splitting the fields until a field is actually referenced. The fields are split using the _current_ value of `FS'! (d.c.) This behavior can be difficult to diagnose. The following -example illustrates the difference between the two methods. (The -`sed'(2) command prints just the first line of `/etc/passwd'.) +example illustrates the difference between the two methods: sed 1q /etc/passwd | awk '{ FS = ":" ; print $1 }' @@ -4999,6 +4999,8 @@ first line of the file, something like: root:x:0:0:Root:/: + (The `sed'(2) command prints just the first line of `/etc/passwd'.) + ---------- Footnotes ---------- (1) Thanks to Andrew Schorr for this tip. @@ -5152,7 +5154,7 @@ run on a system with card readers is another story!) splitting again. Use `FS = FS' to make this happen, without having to know the current value of `FS'. In order to tell which kind of field splitting is in effect, use `PROCINFO["FS"]' (*note Auto-set::). The -value is `"FS"' if regular field splitting is being used, or it is +value is `"FS"' if regular field splitting is being used, or `"FIELDWIDTHS"' if fixed-width field splitting is being used: if (PROCINFO["FS"] == "FS") @@ -5185,10 +5187,10 @@ what they are, and not by what they are not. The most notorious such case is so-called "comma-separated values" (CSV) data. Many spreadsheet programs, for example, can export their data into text files, where each record is terminated with a newline, -and fields are separated by commas. If only commas separated the data, +and fields are separated by commas. If commas only separated the data, there wouldn't be an issue. The problem comes when one of the fields contains an _embedded_ comma. In such cases, most programs embed the -field in double quotes.(1) So we might have data like this: +field in double quotes.(1) So, we might have data like this: Robbins,Arnold,"1234 A Pretty Street, NE",MyTown,MyState,12345-6789,USA @@ -5255,9 +5257,9 @@ being used. provides an elegant solution for the majority of cases, and the `gawk' developers are satisfied with that. - As written, the regexp used for `FPAT' requires that each field have -a least one character. A straightforward modification (changing -changed the first `+' to `*') allows fields to be empty: + As written, the regexp used for `FPAT' requires that each field +contain at least one character. A straightforward modification +(changing the first `+' to `*') allows fields to be empty: FPAT = "([^,]*)|(\"[^\"]+\")" @@ -5265,9 +5267,8 @@ changed the first `+' to `*') allows fields to be empty: available for splitting regular strings (*note String Functions::). To recap, `gawk' provides three independent methods to split input -records into fields. `gawk' uses whichever mechanism was last chosen -based on which of the three variables--`FS', `FIELDWIDTHS', and -`FPAT'--was last assigned to. +records into fields. The mechanism used is based on which of the three +variables--`FS', `FIELDWIDTHS', or `FPAT'--was last assigned to. ---------- Footnotes ---------- @@ -5305,7 +5306,7 @@ empty; lines that contain only whitespace do not count.) `"\n\n+"' to `RS'. This regexp matches the newline at the end of the record and one or more blank lines after the record. In addition, a regular expression always matches the longest possible sequence when -there is a choice (*note Leftmost Longest::). So the next record +there is a choice (*note Leftmost Longest::). So, the next record doesn't start until the first nonblank line that follows--no matter how many blank lines appear in a row, they are considered one record separator. @@ -5317,12 +5318,12 @@ last record, the final newline is removed from the record. In the second case, this special processing is not done. (d.c.) Now that the input is separated into records, the second step is to -separate the fields in the record. One way to do this is to divide each -of the lines into fields in the normal manner. This happens by default -as the result of a special feature. When `RS' is set to the empty -string, _and_ `FS' is set to a single character, the newline character -_always_ acts as a field separator. This is in addition to whatever -field separations result from `FS'.(1) +separate the fields in the records. One way to do this is to divide +each of the lines into fields in the normal manner. This happens by +default as the result of a special feature. When `RS' is set to the +empty string _and_ `FS' is set to a single character, the newline +character _always_ acts as a field separator. This is in addition to +whatever field separations result from `FS'.(1) The original motivation for this special exception was probably to provide useful behavior in the default case (i.e., `FS' is equal to @@ -5330,17 +5331,17 @@ provide useful behavior in the default case (i.e., `FS' is equal to newline character to separate fields, because there is no way to prevent it. However, you can work around this by using the `split()' function to break up the record manually (*note String Functions::). -If you have a single character field separator, you can work around the +If you have a single-character field separator, you can work around the special feature in a different way, by making `FS' into a regexp for that single character. For example, if the field separator is a percent character, instead of `FS = "%"', use `FS = "[%]"'. Another way to separate fields is to put each field on a separate line: to do this, just set the variable `FS' to the string `"\n"'. -(This single character separator matches a single newline.) A +(This single-character separator matches a single newline.) A practical example of a data file organized this way might be a mailing -list, where each entry is separated by blank lines. Consider a mailing -list in a file named `addresses', which looks like this: +list, where blank lines separate the entries. Consider a mailing list +in a file named `addresses', which looks like this: Jane Doe 123 Main Street @@ -5423,7 +5424,7 @@ File: gawk.info, Node: Getline, Next: Read Timeout, Prev: Multiple Line, Up: So far we have been getting our input data from `awk''s main input stream--either the standard input (usually your keyboard, sometimes the -output from another program) or from the files specified on the command +output from another program) or the files specified on the command line. The `awk' language has a special built-in command called `getline' that can be used to read input under your explicit control. @@ -5561,7 +5562,7 @@ and produces these results: free The `getline' command used in this way sets only the variables `NR', -`FNR', and `RT' (and of course, VAR). The record is not split into +`FNR', and `RT' (and, of course, VAR). The record is not split into fields, so the values of the fields (including `$0') and the value of `NF' do not change. @@ -5571,8 +5572,8 @@ File: gawk.info, Node: Getline/File, Next: Getline/Variable/File, Prev: Getli 4.9.3 Using `getline' from a File --------------------------------- -Use `getline < FILE' to read the next record from FILE. Here FILE is a -string-valued expression that specifies the file name. `< FILE' is +Use `getline < FILE' to read the next record from FILE. Here, FILE is +a string-valued expression that specifies the file name. `< FILE' is called a "redirection" because it directs input to come from a different place. For example, the following program reads its input record from the file `secondary.input' when it encounters a first field @@ -5708,8 +5709,8 @@ all `awk' implementations. treatment of a construct like `"echo " "date" | getline'. Most versions, including the current version, treat it at as `("echo " "date") | getline'. (This is also how BWK `awk' behaves.) Some - versions changed and treated it as `"echo " ("date" | getline)'. - (This is how `mawk' behaves.) In short, _always_ use explicit + versions instead treat it as `"echo " ("date" | getline)'. (This + is how `mawk' behaves.) In short, _always_ use explicit parentheses, and then you won't have to worry.  @@ -5745,15 +5746,16 @@ File: gawk.info, Node: Getline/Coprocess, Next: Getline/Variable/Coprocess, P 4.9.7 Using `getline' from a Coprocess -------------------------------------- -Input into `getline' from a pipe is a one-way operation. The command -that is started with `COMMAND | getline' only sends data _to_ your -`awk' program. +Reading input into `getline' from a pipe is a one-way operation. The +command that is started with `COMMAND | getline' only sends data _to_ +your `awk' program. On occasion, you might want to send data to another program for processing and then read the results back. `gawk' allows you to start a "coprocess", with which two-way communications are possible. This is done with the `|&' operator. Typically, you write data to the -coprocess first and then read results back, as shown in the following: +coprocess first and then read the results back, as shown in the +following: print "SOME QUERY" |& "db_server" "db_server" |& getline @@ -5815,7 +5817,7 @@ in mind: files. (d.c.) (See *note BEGIN/END::; also *note Auto-set::.) * Using `FILENAME' with `getline' (`getline < FILENAME') is likely - to be a source for confusion. `awk' opens a separate input stream + to be a source of confusion. `awk' opens a separate input stream from the current input file. However, by not using a variable, `$0' and `NF' are still updated. If you're doing this, it's probably by accident, and you should reconsider what it is you're @@ -5823,15 +5825,15 @@ in mind: * *note Getline Summary::, presents a table summarizing the `getline' variants and which variables they can affect. It is - worth noting that those variants which do not use redirection can + worth noting that those variants that do not use redirection can cause `FILENAME' to be updated if they cause `awk' to start reading a new input file. * If the variable being assigned is an expression with side effects, different versions of `awk' behave differently upon encountering end-of-file. Some versions don't evaluate the expression; many - versions (including `gawk') do. Here is an example, due to Duncan - Moore: + versions (including `gawk') do. Here is an example, courtesy of + Duncan Moore: BEGIN { system("echo 1 > f") @@ -5839,8 +5841,8 @@ in mind: print c } - Here, the side effect is the `++c'. Is `c' incremented if end of - file is encountered, before the element in `a' is assigned? + Here, the side effect is the `++c'. Is `c' incremented if + end-of-file is encountered before the element in `a' is assigned? `gawk' treats `getline' like a function call, and evaluates the expression `a[++c]' before attempting to read from `f'. However, @@ -5884,8 +5886,8 @@ This minor node describes a feature that is specific to `gawk'. You may specify a timeout in milliseconds for reading input from the keyboard, a pipe, or two-way communication, including TCP/IP sockets. -This can be done on a per input, command, or connection basis, by -setting a special element in the `PROCINFO' array (*note Auto-set::): +This can be done on a per-input, per-command, or per-connection basis, +by setting a special element in the `PROCINFO' array (*note Auto-set::): PROCINFO["input_name", "READ_TIMEOUT"] = TIMEOUT IN MILLISECONDS @@ -5909,7 +5911,7 @@ for more than five seconds: print $0 `gawk' terminates the read operation if input does not arrive after -waiting for the timeout period, returns failure and sets `ERRNO' to an +waiting for the timeout period, returns failure, and sets `ERRNO' to an appropriate string value. A negative or zero value for the timeout is the same as specifying no timeout at all. @@ -5949,7 +5951,7 @@ input to arrive: environment variable exists, `gawk' uses its value to initialize the timeout value. The exclusive use of the environment variable to specify timeout has the disadvantage of not being able to control it on -a per command or connection basis. +a per-command or per-connection basis. `gawk' considers a timeout event to be an error even though the attempt to read from the underlying device may succeed in a later @@ -6017,7 +6019,7 @@ File: gawk.info, Node: Input Summary, Next: Input Exercises, Prev: Command-li * `gawk' sets `RT' to the text matched by `RS'. * After splitting the input into records, `awk' further splits the - record into individual fields, named `$1', `$2', and so on. `$0' + records into individual fields, named `$1', `$2', and so on. `$0' is the whole record, and `NF' indicates how many fields there are. The default way to split fields is between whitespace characters. @@ -6031,19 +6033,21 @@ File: gawk.info, Node: Input Summary, Next: Input Exercises, Prev: Command-li * Field splitting is more complicated than record splitting: - Field separator value Fields are split ... `awk' / - `gawk' + Field separator value Fields are split ... `awk' / + `gawk' ---------------------------------------------------------------------- - `FS == " "' On runs of whitespace `awk' - `FS == ANY SINGLE On that character `awk' - CHARACTER' - `FS == REGEXP' On text matching the regexp `awk' - `FS == ""' Each individual character is `gawk' - a separate field - `FIELDWIDTHS == LIST OF Based on character position `gawk' - COLUMNS' - `FPAT == REGEXP' On the text surrounding text `gawk' - matching the regexp + `FS == " "' On runs of whitespace `awk' + `FS == ANY SINGLE On that character `awk' + CHARACTER' + `FS == REGEXP' On text matching the `awk' + regexp + `FS == ""' Such that each individual `gawk' + character is a separate + field + `FIELDWIDTHS == LIST OF Based on character `gawk' + COLUMNS' position + `FPAT == REGEXP' On the text surrounding `gawk' + text matching the regexp * Using `FS = "\n"' causes the entire record to be a single field (assuming that newlines separate records). @@ -6053,12 +6057,11 @@ File: gawk.info, Node: Input Summary, Next: Input Exercises, Prev: Command-li * Use `PROCINFO["FS"]' to see how fields are being split. - * Use `getline' in its various forms to read additional records, - from the default input stream, from a file, or from a pipe or - coprocess. + * Use `getline' in its various forms to read additional records from + the default input stream, from a file, or from a pipe or coprocess. - * Use `PROCINFO[FILE, "READ_TIMEOUT"]' to cause reads to timeout for - FILE. + * Use `PROCINFO[FILE, "READ_TIMEOUT"]' to cause reads to time out + for FILE. * Directories on the command line are fatal for standard `awk'; `gawk' ignores them if not in POSIX mode. @@ -6152,7 +6155,7 @@ you will probably get an error. Keep in mind that a space is printed between any two items. Note that the `print' statement is a statement and not an -expression--you can't use it in the pattern part of a PATTERN-ACTION +expression--you can't use it in the pattern part of a pattern-action statement, for example.  @@ -6300,7 +6303,7 @@ File: gawk.info, Node: OFMT, Next: Printf, Prev: Output Separators, Up: Prin =========================================== When printing numeric values with the `print' statement, `awk' -internally converts the number to a string of characters and prints +internally converts each number to a string of characters and prints that string. `awk' uses the `sprintf()' function to do this conversion (*note String Functions::). For now, it suffices to say that the `sprintf()' function accepts a "format specification" that tells it how @@ -6355,7 +6358,7 @@ A simple `printf' statement looks like this: As for `print', the entire list of arguments may optionally be enclosed in parentheses. Here too, the parentheses are necessary if any of the -item expressions use the `>' relational operator; otherwise, it can be +item expressions uses the `>' relational operator; otherwise, it can be confused with an output redirection (*note Redirection::). The difference between `printf' and `print' is the FORMAT argument. @@ -6382,7 +6385,7 @@ statements. For example: > }' -| Don't Panic! -Here, neither the `+' nor the `OUCH!' appear in the output message. +Here, neither the `+' nor the `OUCH!' appears in the output message.  File: gawk.info, Node: Control Letters, Next: Format Modifiers, Prev: Basic Printf, Up: Printf @@ -6421,7 +6424,7 @@ width. Here is a list of the format-control letters: (The `%i' specification is for compatibility with ISO C.) `%e', `%E' - Print a number in scientific (exponential) notation; for example: + Print a number in scientific (exponential) notation. For example: printf "%4.3e\n", 1950 @@ -6446,7 +6449,7 @@ width. Here is a list of the format-control letters: Math Definitions::). `%F' - Like `%f' but the infinity and "not a number" values are spelled + Like `%f', but the infinity and "not a number" values are spelled using uppercase letters. The `%F' format is a POSIX extension to ISO C; not all systems @@ -6640,7 +6643,7 @@ string, like so: s = "abcdefg" printf "%" w "." p "s\n", s -This is not particularly easy to read but it does work. +This is not particularly easy to read, but it does work. C programmers may be used to supplying additional modifiers (`h', `j', `l', `L', `t', and `z') in `printf' format strings. These are not @@ -6679,7 +6682,7 @@ an aligned two-column table of names and phone numbers, as shown here: -| Jean-Paul 555-2127 In this case, the phone numbers had to be printed as strings because -the numbers are separated by a dash. Printing the phone numbers as +the numbers are separated by dashes. Printing the phone numbers as numbers would have produced just the first three digits: `555'. This would have been pretty confusing. @@ -6727,7 +6730,7 @@ output, usually the screen. Both `print' and `printf' can also send their output to other places. This is called "redirection". NOTE: When `--sandbox' is specified (*note Options::), redirecting - output to files, pipes and coprocesses is disabled. + output to files, pipes, and coprocesses is disabled. A redirection appears after the `print' or `printf' statement. Redirections in `awk' are written just like redirections in shell @@ -6767,7 +6770,7 @@ work identically for `printf': Each output file contains one name or number per line. `print ITEMS >> OUTPUT-FILE' - This redirection prints the items into the pre-existing output file + This redirection prints the items into the preexisting output file named OUTPUT-FILE. The difference between this and the single-`>' redirection is that the old contents (if any) of OUTPUT-FILE are not erased. Instead, the `awk' output is appended to the file. @@ -6815,8 +6818,8 @@ work identically for `printf': `print ITEMS |& COMMAND' This redirection prints the items to the input of COMMAND. The difference between this and the single-`|' redirection is that the - output from COMMAND can be read with `getline'. Thus COMMAND is a - "coprocess", which works together with, but subsidiary to, the + output from COMMAND can be read with `getline'. Thus, COMMAND is + a "coprocess", which works together with but is subsidiary to the `awk' program. This feature is a `gawk' extension, and is not available in POSIX @@ -6840,7 +6843,7 @@ a file, and then to use `>>' for subsequent output: This is indeed how redirections must be used from the shell. But in `awk', it isn't necessary. In this kind of case, a program should use `>' for all the `print' statements, because the output file is only -opened once. (It happens that if you mix `>' and `>>' that output is +opened once. (It happens that if you mix `>' and `>>' output is produced in the expected order. However, mixing the operators for the same file is definitely poor style, and is confusing to readers of your program.) @@ -6873,14 +6876,14 @@ command lines to be fed to the shell.  File: gawk.info, Node: Special FD, Next: Special Files, Prev: Redirection, Up: Printing -5.7 Special Files for Standard Pre-Opened Data Streams -====================================================== +5.7 Special Files for Standard Preopened Data Streams +===================================================== Running programs conventionally have three input and output streams already available to them for reading and writing. These are known as the "standard input", "standard output", and "standard error output". -These open streams (and any other open file or pipe) are often referred -to by the technical term "file descriptors". +These open streams (and any other open files or pipes) are often +referred to by the technical term "file descriptors". These streams are, by default, connected to your keyboard and screen, but they are often redirected with the shell, via the `<', `<<', @@ -6905,7 +6908,7 @@ error messages to the screen, like this: (`/dev/tty' is a special file supplied by the operating system that is connected to your keyboard and screen. It represents the "terminal,"(1) which on modern systems is a keyboard and screen, not a serial console.) -This generally has the same effect but not always: although the +This generally has the same effect, but not always: although the standard error stream is usually the screen, it can be redirected; when that happens, writing to the screen is not correct. In fact, if `awk' is run from a background job, it may not have a terminal at all. Then @@ -6932,7 +6935,7 @@ becomes: print "Serious error detected!" > "/dev/stderr" - Note the use of quotes around the file name. Like any other + Note the use of quotes around the file name. Like with any other redirection, the value must be a string. It is a common error to omit the quotes, which leads to confusing results. @@ -6965,7 +6968,7 @@ there are special file names reserved for TCP/IP networking.  File: gawk.info, Node: Other Inherited Files, Next: Special Network, Up: Special Files -5.8.1 Accessing Other Open Files With `gawk' +5.8.1 Accessing Other Open Files with `gawk' -------------------------------------------- Besides the `/dev/stdin', `/dev/stdout', and `/dev/stderr' special file @@ -7015,7 +7018,7 @@ File: gawk.info, Node: Special Caveats, Prev: Special Network, Up: Special Fi Here are some things to bear in mind when using the special file names that `gawk' provides: - * Recognition of the file names for the three standard pre-opened + * Recognition of the file names for the three standard preopened files is disabled only in POSIX mode. * Recognition of the other special file names is disabled if `gawk' @@ -7024,7 +7027,7 @@ that `gawk' provides: * `gawk' _always_ interprets these special file names. For example, using `/dev/fd/4' for output actually writes on file descriptor 4, - and not on a new file descriptor that is `dup()''ed from file + and not on a new file descriptor that is `dup()'ed from file descriptor 4. Most of the time this does not matter; however, it is important to _not_ close any of the files related to file descriptors 0, 1, and 2. Doing so results in unpredictable @@ -7184,8 +7187,8 @@ closing input or output files, respectively. This value is zero if the close succeeds, or -1 if it fails. The POSIX standard is very vague; it says that `close()' returns -zero on success and nonzero otherwise. In general, different -implementations vary in what they report when closing pipes; thus the +zero on success and a nonzero value otherwise. In general, different +implementations vary in what they report when closing pipes; thus, the return value cannot be used portably. (d.c.) In POSIX mode (*note Options::), `gawk' just returns zero when closing a pipe. @@ -7211,8 +7214,8 @@ File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Close Fi numeric values for the `print' statement. * The `printf' statement provides finer-grained control over output, - with format control letters for different data types and various - flags that modify the behavior of the format control letters. + with format-control letters for different data types and various + flags that modify the behavior of the format-control letters. * Output from both `print' and `printf' may be redirected to files, pipes, and coprocesses. @@ -28318,7 +28321,7 @@ Unix `awk' To get `awka', go to `http://sourceforge.net/projects/awka'. The project seems to be frozen; no new code changes have been made - since approximately 2003. + since approximately 2001. `pawk' Nelson H.F. Beebe at the University of Utah has modified BWK `awk' @@ -28558,7 +28561,7 @@ possible to include them: document describes how GNU software should be written. If you haven't read it, please do so, preferably _before_ starting to modify `gawk'. (The `GNU Coding Standards' are available from the - GNU Project's website (http://www.gnu.org/prep/standards_toc.html). + GNU Project's website (http://www.gnu.org/prep/standards/). Texinfo, Info, and DVI versions are also available.) 5. Use the `gawk' coding style. The C code for `gawk' follows the @@ -31263,7 +31266,7 @@ Index * ! (exclamation point), !~ operator <5>: Case-sensitivity. (line 26) * ! (exclamation point), !~ operator <6>: Computed Regexps. (line 6) * ! (exclamation point), !~ operator: Regexp Usage. (line 19) -* " (double quote), in regexp constants: Computed Regexps. (line 29) +* " (double quote), in regexp constants: Computed Regexps. (line 30) * " (double quote), in shell commands: Quoting. (line 54) * # (number sign), #! (executable scripts): Executable Scripts. (line 6) @@ -31498,7 +31501,7 @@ Index * \ (backslash), in escape sequences: Escape Sequences. (line 6) * \ (backslash), in escape sequences, POSIX and: Escape Sequences. (line 105) -* \ (backslash), in regexp constants: Computed Regexps. (line 29) +* \ (backslash), in regexp constants: Computed Regexps. (line 30) * \ (backslash), in shell commands: Quoting. (line 48) * \ (backslash), regexp operator: Regexp Operators. (line 18) * ^ (caret), ^ operator: Precedence. (line 49) @@ -31767,7 +31770,7 @@ Index * backslash (\), in escape sequences: Escape Sequences. (line 6) * backslash (\), in escape sequences, POSIX and: Escape Sequences. (line 105) -* backslash (\), in regexp constants: Computed Regexps. (line 29) +* backslash (\), in regexp constants: Computed Regexps. (line 30) * backslash (\), in shell commands: Quoting. (line 48) * backslash (\), regexp operator: Regexp Operators. (line 18) * backtrace debugger command: Execution Stack. (line 13) @@ -32364,7 +32367,7 @@ Index * dollar sign ($), incrementing fields and arrays: Increment Ops. (line 30) * dollar sign ($), regexp operator: Regexp Operators. (line 35) -* double quote ("), in regexp constants: Computed Regexps. (line 29) +* double quote ("), in regexp constants: Computed Regexps. (line 30) * double quote ("), in shell commands: Quoting. (line 54) * down debugger command: Execution Stack. (line 23) * Drepper, Ulrich: Acknowledgments. (line 52) @@ -32750,7 +32753,7 @@ Index * gawk, awk and: Preface. (line 21) * gawk, bitwise operations in: Bitwise Functions. (line 40) * gawk, break statement in: Break Statement. (line 51) -* gawk, character classes and: Bracket Expressions. (line 100) +* gawk, character classes and: Bracket Expressions. (line 101) * gawk, coding style in: Adding Code. (line 38) * gawk, command-line options, and regular expressions: GNU Regexp Operators. (line 70) @@ -33027,7 +33030,7 @@ Index (line 13) * internationalization, localization: User-modified. (line 151) * internationalization, localization, character classes: Bracket Expressions. - (line 100) + (line 101) * internationalization, localization, gawk and: Internationalization. (line 13) * internationalization, localization, locale categories: Explaining gettext. @@ -33245,8 +33248,8 @@ Index * newlines, as field separators: Default Field Splitting. (line 6) * newlines, as record separators: awk split records. (line 12) -* newlines, in dynamic regexps: Computed Regexps. (line 59) -* newlines, in regexp constants: Computed Regexps. (line 69) +* newlines, in dynamic regexps: Computed Regexps. (line 60) +* newlines, in regexp constants: Computed Regexps. (line 70) * newlines, printing: Print Examples. (line 12) * newlines, separating statements in actions <1>: Statements. (line 10) * newlines, separating statements in actions: Action Overview. @@ -33672,8 +33675,8 @@ Index * regexp constants, as patterns: Expression Patterns. (line 34) * regexp constants, in gawk: Using Constant Regexps. (line 28) -* regexp constants, slashes vs. quotes: Computed Regexps. (line 29) -* regexp constants, vs. string constants: Computed Regexps. (line 39) +* regexp constants, slashes vs. quotes: Computed Regexps. (line 30) +* regexp constants, vs. string constants: Computed Regexps. (line 40) * register extension: Registration Functions. (line 6) * regular expressions: Regexp. (line 6) @@ -33692,7 +33695,7 @@ Index (line 57) * regular expressions, dynamic: Computed Regexps. (line 6) * regular expressions, dynamic, with embedded newlines: Computed Regexps. - (line 59) + (line 60) * regular expressions, gawk, command-line options: GNU Regexp Operators. (line 70) * regular expressions, interval expressions and: Options. (line 281) @@ -33889,7 +33892,7 @@ Index * sidebar, Understanding #!: Executable Scripts. (line 31) * sidebar, Understanding $0: Changing Fields. (line 134) * sidebar, Using \n in Bracket Expressions of Dynamic Regexps: Computed Regexps. - (line 57) + (line 58) * sidebar, Using close()'s Return Value: Close Files And Pipes. (line 131) * SIGHUP signal, for dynamic profiling: Profiling. (line 211) @@ -33983,7 +33986,7 @@ Index * stream editors: Full Line Fields. (line 22) * strftime: Time Functions. (line 48) * string constants: Scalar Constants. (line 15) -* string constants, vs. regexp constants: Computed Regexps. (line 39) +* string constants, vs. regexp constants: Computed Regexps. (line 40) * string extraction (internationalization): String Extraction. (line 6) * string length: String Functions. (line 171) @@ -34118,7 +34121,7 @@ Index * troubleshooting, quotes with file names: Special FD. (line 62) * troubleshooting, readable data files: File Checking. (line 6) * troubleshooting, regexp constants vs. string constants: Computed Regexps. - (line 39) + (line 40) * troubleshooting, string concatenation: Concatenation. (line 26) * troubleshooting, substr() function: String Functions. (line 499) * troubleshooting, system() function: I/O Functions. (line 128) @@ -34364,495 +34367,495 @@ Ref: Regexp Operators-Footnote-1170485 Ref: Regexp Operators-Footnote-2170632 Node: Bracket Expressions170730 Ref: table-char-classes172745 -Node: Leftmost Longest175670 -Node: Computed Regexps176972 -Node: GNU Regexp Operators180369 -Node: Case-sensitivity184042 -Ref: Case-sensitivity-Footnote-1186927 -Ref: Case-sensitivity-Footnote-2187162 -Node: Regexp Summary187270 -Node: Reading Files188737 -Node: Records190831 -Node: awk split records191564 -Node: gawk split records196479 -Ref: gawk split records-Footnote-1201023 -Node: Fields201060 -Ref: Fields-Footnote-1203836 -Node: Nonconstant Fields203922 -Ref: Nonconstant Fields-Footnote-1206165 -Node: Changing Fields206369 -Node: Field Separators212298 -Node: Default Field Splitting215003 -Node: Regexp Field Splitting216120 -Node: Single Character Fields219470 -Node: Command Line Field Separator220529 -Node: Full Line Fields223741 -Ref: Full Line Fields-Footnote-1225258 -Ref: Full Line Fields-Footnote-2225304 -Node: Field Splitting Summary225405 -Node: Constant Size227479 -Node: Splitting By Content232068 -Ref: Splitting By Content-Footnote-1236062 -Node: Multiple Line236225 -Ref: Multiple Line-Footnote-1242111 -Node: Getline242290 -Node: Plain Getline244502 -Node: Getline/Variable247142 -Node: Getline/File248290 -Node: Getline/Variable/File249674 -Ref: Getline/Variable/File-Footnote-1251277 -Node: Getline/Pipe251364 -Node: Getline/Variable/Pipe254047 -Node: Getline/Coprocess255178 -Node: Getline/Variable/Coprocess256430 -Node: Getline Notes257169 -Node: Getline Summary259961 -Ref: table-getline-variants260373 -Node: Read Timeout261202 -Ref: Read Timeout-Footnote-1265026 -Node: Command-line directories265084 -Node: Input Summary265989 -Node: Input Exercises269290 -Node: Printing270018 -Node: Print271795 -Node: Print Examples273252 -Node: Output Separators276031 -Node: OFMT278049 -Node: Printf279403 -Node: Basic Printf280188 -Node: Control Letters281758 -Node: Format Modifiers285741 -Node: Printf Examples291750 -Node: Redirection294236 -Node: Special FD301077 -Ref: Special FD-Footnote-1304237 -Node: Special Files304311 -Node: Other Inherited Files304928 -Node: Special Network305928 -Node: Special Caveats306790 -Node: Close Files And Pipes307741 -Ref: Close Files And Pipes-Footnote-1314923 -Ref: Close Files And Pipes-Footnote-2315071 -Node: Output Summary315221 -Node: Output Exercises316219 -Node: Expressions316899 -Node: Values318084 -Node: Constants318762 -Node: Scalar Constants319453 -Ref: Scalar Constants-Footnote-1320312 -Node: Nondecimal-numbers320562 -Node: Regexp Constants323580 -Node: Using Constant Regexps324105 -Node: Variables327248 -Node: Using Variables327903 -Node: Assignment Options329814 -Node: Conversion331689 -Node: Strings And Numbers332213 -Ref: Strings And Numbers-Footnote-1335278 -Node: Locale influences conversions335387 -Ref: table-locale-affects338134 -Node: All Operators338722 -Node: Arithmetic Ops339352 -Node: Concatenation341857 -Ref: Concatenation-Footnote-1344676 -Node: Assignment Ops344782 -Ref: table-assign-ops349761 -Node: Increment Ops351033 -Node: Truth Values and Conditions354471 -Node: Truth Values355556 -Node: Typing and Comparison356605 -Node: Variable Typing357415 -Node: Comparison Operators361068 -Ref: table-relational-ops361478 -Node: POSIX String Comparison364973 -Ref: POSIX String Comparison-Footnote-1366045 -Node: Boolean Ops366183 -Ref: Boolean Ops-Footnote-1370662 -Node: Conditional Exp370753 -Node: Function Calls372480 -Node: Precedence376360 -Node: Locales380021 -Node: Expressions Summary381653 -Node: Patterns and Actions384213 -Node: Pattern Overview385333 -Node: Regexp Patterns387012 -Node: Expression Patterns387555 -Node: Ranges391265 -Node: BEGIN/END394371 -Node: Using BEGIN/END395132 -Ref: Using BEGIN/END-Footnote-1397866 -Node: I/O And BEGIN/END397972 -Node: BEGINFILE/ENDFILE400286 -Node: Empty403187 -Node: Using Shell Variables403504 -Node: Action Overview405777 -Node: Statements408103 -Node: If Statement409951 -Node: While Statement411446 -Node: Do Statement413475 -Node: For Statement414619 -Node: Switch Statement417776 -Node: Break Statement420158 -Node: Continue Statement422199 -Node: Next Statement424026 -Node: Nextfile Statement426407 -Node: Exit Statement429037 -Node: Built-in Variables431440 -Node: User-modified432573 -Ref: User-modified-Footnote-1440254 -Node: Auto-set440316 -Ref: Auto-set-Footnote-1453351 -Ref: Auto-set-Footnote-2453556 -Node: ARGC and ARGV453612 -Node: Pattern Action Summary457830 -Node: Arrays460257 -Node: Array Basics461586 -Node: Array Intro462430 -Ref: figure-array-elements464394 -Ref: Array Intro-Footnote-1466920 -Node: Reference to Elements467048 -Node: Assigning Elements469500 -Node: Array Example469991 -Node: Scanning an Array471749 -Node: Controlling Scanning474765 -Ref: Controlling Scanning-Footnote-1479961 -Node: Numeric Array Subscripts480277 -Node: Uninitialized Subscripts482462 -Node: Delete484079 -Ref: Delete-Footnote-1486822 -Node: Multidimensional486879 -Node: Multiscanning489976 -Node: Arrays of Arrays491565 -Node: Arrays Summary496324 -Node: Functions498416 -Node: Built-in499315 -Node: Calling Built-in500393 -Node: Numeric Functions502384 -Ref: Numeric Functions-Footnote-1506401 -Ref: Numeric Functions-Footnote-2506758 -Ref: Numeric Functions-Footnote-3506806 -Node: String Functions507078 -Ref: String Functions-Footnote-1530553 -Ref: String Functions-Footnote-2530682 -Ref: String Functions-Footnote-3530930 -Node: Gory Details531017 -Ref: table-sub-escapes532798 -Ref: table-sub-proposed534318 -Ref: table-posix-sub535682 -Ref: table-gensub-escapes537218 -Ref: Gory Details-Footnote-1538050 -Node: I/O Functions538201 -Ref: I/O Functions-Footnote-1545419 -Node: Time Functions545566 -Ref: Time Functions-Footnote-1556054 -Ref: Time Functions-Footnote-2556122 -Ref: Time Functions-Footnote-3556280 -Ref: Time Functions-Footnote-4556391 -Ref: Time Functions-Footnote-5556503 -Ref: Time Functions-Footnote-6556730 -Node: Bitwise Functions556996 -Ref: table-bitwise-ops557558 -Ref: Bitwise Functions-Footnote-1561867 -Node: Type Functions562036 -Node: I18N Functions563187 -Node: User-defined564832 -Node: Definition Syntax565637 -Ref: Definition Syntax-Footnote-1571044 -Node: Function Example571115 -Ref: Function Example-Footnote-1574034 -Node: Function Caveats574056 -Node: Calling A Function574574 -Node: Variable Scope575532 -Node: Pass By Value/Reference578520 -Node: Return Statement582015 -Node: Dynamic Typing584996 -Node: Indirect Calls585925 -Ref: Indirect Calls-Footnote-1597227 -Node: Functions Summary597355 -Node: Library Functions600057 -Ref: Library Functions-Footnote-1603666 -Ref: Library Functions-Footnote-2603809 -Node: Library Names603980 -Ref: Library Names-Footnote-1607434 -Ref: Library Names-Footnote-2607657 -Node: General Functions607743 -Node: Strtonum Function608846 -Node: Assert Function611868 -Node: Round Function615192 -Node: Cliff Random Function616733 -Node: Ordinal Functions617749 -Ref: Ordinal Functions-Footnote-1620812 -Ref: Ordinal Functions-Footnote-2621064 -Node: Join Function621275 -Ref: Join Function-Footnote-1623044 -Node: Getlocaltime Function623244 -Node: Readfile Function626988 -Node: Shell Quoting628958 -Node: Data File Management630359 -Node: Filetrans Function630991 -Node: Rewind Function635047 -Node: File Checking636434 -Ref: File Checking-Footnote-1637766 -Node: Empty Files637967 -Node: Ignoring Assigns639946 -Node: Getopt Function641497 -Ref: Getopt Function-Footnote-1652959 -Node: Passwd Functions653159 -Ref: Passwd Functions-Footnote-1661996 -Node: Group Functions662084 -Ref: Group Functions-Footnote-1669978 -Node: Walking Arrays670191 -Node: Library Functions Summary671794 -Node: Library Exercises673195 -Node: Sample Programs674475 -Node: Running Examples675245 -Node: Clones675973 -Node: Cut Program677197 -Node: Egrep Program686916 -Ref: Egrep Program-Footnote-1694414 -Node: Id Program694524 -Node: Split Program698169 -Ref: Split Program-Footnote-1701617 -Node: Tee Program701745 -Node: Uniq Program704534 -Node: Wc Program711953 -Ref: Wc Program-Footnote-1716203 -Node: Miscellaneous Programs716297 -Node: Dupword Program717510 -Node: Alarm Program719541 -Node: Translate Program724345 -Ref: Translate Program-Footnote-1728910 -Node: Labels Program729180 -Ref: Labels Program-Footnote-1732531 -Node: Word Sorting732615 -Node: History Sorting736686 -Node: Extract Program738522 -Node: Simple Sed746047 -Node: Igawk Program749115 -Ref: Igawk Program-Footnote-1763439 -Ref: Igawk Program-Footnote-2763640 -Ref: Igawk Program-Footnote-3763762 -Node: Anagram Program763877 -Node: Signature Program766934 -Node: Programs Summary768181 -Node: Programs Exercises769374 -Ref: Programs Exercises-Footnote-1773505 -Node: Advanced Features773596 -Node: Nondecimal Data775544 -Node: Array Sorting777134 -Node: Controlling Array Traversal777831 -Ref: Controlling Array Traversal-Footnote-1786164 -Node: Array Sorting Functions786282 -Ref: Array Sorting Functions-Footnote-1790171 -Node: Two-way I/O790367 -Ref: Two-way I/O-Footnote-1795312 -Ref: Two-way I/O-Footnote-2795498 -Node: TCP/IP Networking795580 -Node: Profiling798453 -Node: Advanced Features Summary806000 -Node: Internationalization807933 -Node: I18N and L10N809413 -Node: Explaining gettext810099 -Ref: Explaining gettext-Footnote-1815124 -Ref: Explaining gettext-Footnote-2815308 -Node: Programmer i18n815473 -Ref: Programmer i18n-Footnote-1820339 -Node: Translator i18n820388 -Node: String Extraction821182 -Ref: String Extraction-Footnote-1822313 -Node: Printf Ordering822399 -Ref: Printf Ordering-Footnote-1825185 -Node: I18N Portability825249 -Ref: I18N Portability-Footnote-1827704 -Node: I18N Example827767 -Ref: I18N Example-Footnote-1830570 -Node: Gawk I18N830642 -Node: I18N Summary831280 -Node: Debugger832619 -Node: Debugging833641 -Node: Debugging Concepts834082 -Node: Debugging Terms835935 -Node: Awk Debugging838507 -Node: Sample Debugging Session839401 -Node: Debugger Invocation839921 -Node: Finding The Bug841305 -Node: List of Debugger Commands847780 -Node: Breakpoint Control849113 -Node: Debugger Execution Control852809 -Node: Viewing And Changing Data856173 -Node: Execution Stack859551 -Node: Debugger Info861188 -Node: Miscellaneous Debugger Commands865205 -Node: Readline Support870234 -Node: Limitations871126 -Node: Debugging Summary873240 -Node: Arbitrary Precision Arithmetic874408 -Node: Computer Arithmetic875824 -Ref: table-numeric-ranges879422 -Ref: Computer Arithmetic-Footnote-1880281 -Node: Math Definitions880338 -Ref: table-ieee-formats883626 -Ref: Math Definitions-Footnote-1884230 -Node: MPFR features884335 -Node: FP Math Caution886006 -Ref: FP Math Caution-Footnote-1887056 -Node: Inexactness of computations887425 -Node: Inexact representation888384 -Node: Comparing FP Values889741 -Node: Errors accumulate890823 -Node: Getting Accuracy892256 -Node: Try To Round894918 -Node: Setting precision895817 -Ref: table-predefined-precision-strings896501 -Node: Setting the rounding mode898290 -Ref: table-gawk-rounding-modes898654 -Ref: Setting the rounding mode-Footnote-1902109 -Node: Arbitrary Precision Integers902288 -Ref: Arbitrary Precision Integers-Footnote-1905274 -Node: POSIX Floating Point Problems905423 -Ref: POSIX Floating Point Problems-Footnote-1909296 -Node: Floating point summary909334 -Node: Dynamic Extensions911528 -Node: Extension Intro913080 -Node: Plugin License914346 -Node: Extension Mechanism Outline915143 -Ref: figure-load-extension915571 -Ref: figure-register-new-function917051 -Ref: figure-call-new-function918055 -Node: Extension API Description920041 -Node: Extension API Functions Introduction921491 -Node: General Data Types926315 -Ref: General Data Types-Footnote-1932054 -Node: Memory Allocation Functions932353 -Ref: Memory Allocation Functions-Footnote-1935192 -Node: Constructor Functions935288 -Node: Registration Functions937022 -Node: Extension Functions937707 -Node: Exit Callback Functions940004 -Node: Extension Version String941252 -Node: Input Parsers941917 -Node: Output Wrappers951796 -Node: Two-way processors956311 -Node: Printing Messages958515 -Ref: Printing Messages-Footnote-1959591 -Node: Updating `ERRNO'959743 -Node: Requesting Values960483 -Ref: table-value-types-returned961211 -Node: Accessing Parameters962168 -Node: Symbol Table Access963399 -Node: Symbol table by name963913 -Node: Symbol table by cookie965894 -Ref: Symbol table by cookie-Footnote-1970038 -Node: Cached values970101 -Ref: Cached values-Footnote-1973600 -Node: Array Manipulation973691 -Ref: Array Manipulation-Footnote-1974789 -Node: Array Data Types974826 -Ref: Array Data Types-Footnote-1977481 -Node: Array Functions977573 -Node: Flattening Arrays981427 -Node: Creating Arrays988319 -Node: Extension API Variables993090 -Node: Extension Versioning993726 -Node: Extension API Informational Variables995627 -Node: Extension API Boilerplate996692 -Node: Finding Extensions1000501 -Node: Extension Example1001061 -Node: Internal File Description1001833 -Node: Internal File Ops1005900 -Ref: Internal File Ops-Footnote-11017570 -Node: Using Internal File Ops1017710 -Ref: Using Internal File Ops-Footnote-11020093 -Node: Extension Samples1020366 -Node: Extension Sample File Functions1021892 -Node: Extension Sample Fnmatch1029530 -Node: Extension Sample Fork1031021 -Node: Extension Sample Inplace1032236 -Node: Extension Sample Ord1033911 -Node: Extension Sample Readdir1034747 -Ref: table-readdir-file-types1035623 -Node: Extension Sample Revout1036434 -Node: Extension Sample Rev2way1037024 -Node: Extension Sample Read write array1037764 -Node: Extension Sample Readfile1039704 -Node: Extension Sample Time1040799 -Node: Extension Sample API Tests1042148 -Node: gawkextlib1042639 -Node: Extension summary1045297 -Node: Extension Exercises1048986 -Node: Language History1049708 -Node: V7/SVR3.11051364 -Node: SVR41053545 -Node: POSIX1054990 -Node: BTL1056379 -Node: POSIX/GNU1057113 -Node: Feature History1062677 -Node: Common Extensions1075775 -Node: Ranges and Locales1077099 -Ref: Ranges and Locales-Footnote-11081717 -Ref: Ranges and Locales-Footnote-21081744 -Ref: Ranges and Locales-Footnote-31081978 -Node: Contributors1082199 -Node: History summary1087740 -Node: Installation1089110 -Node: Gawk Distribution1090056 -Node: Getting1090540 -Node: Extracting1091363 -Node: Distribution contents1092998 -Node: Unix Installation1098715 -Node: Quick Installation1099332 -Node: Additional Configuration Options1101756 -Node: Configuration Philosophy1103494 -Node: Non-Unix Installation1105863 -Node: PC Installation1106321 -Node: PC Binary Installation1107640 -Node: PC Compiling1109488 -Ref: PC Compiling-Footnote-11112509 -Node: PC Testing1112618 -Node: PC Using1113794 -Node: Cygwin1117909 -Node: MSYS1118732 -Node: VMS Installation1119232 -Node: VMS Compilation1120024 -Ref: VMS Compilation-Footnote-11121246 -Node: VMS Dynamic Extensions1121304 -Node: VMS Installation Details1122988 -Node: VMS Running1125240 -Node: VMS GNV1128076 -Node: VMS Old Gawk1128810 -Node: Bugs1129280 -Node: Other Versions1133163 -Node: Installation summary1139587 -Node: Notes1140643 -Node: Compatibility Mode1141508 -Node: Additions1142290 -Node: Accessing The Source1143215 -Node: Adding Code1144650 -Node: New Ports1150815 -Node: Derived Files1155297 -Ref: Derived Files-Footnote-11160772 -Ref: Derived Files-Footnote-21160806 -Ref: Derived Files-Footnote-31161402 -Node: Future Extensions1161516 -Node: Implementation Limitations1162122 -Node: Extension Design1163370 -Node: Old Extension Problems1164524 -Ref: Old Extension Problems-Footnote-11166041 -Node: Extension New Mechanism Goals1166098 -Ref: Extension New Mechanism Goals-Footnote-11169458 -Node: Extension Other Design Decisions1169647 -Node: Extension Future Growth1171755 -Node: Old Extension Mechanism1172591 -Node: Notes summary1174353 -Node: Basic Concepts1175539 -Node: Basic High Level1176220 -Ref: figure-general-flow1176492 -Ref: figure-process-flow1177091 -Ref: Basic High Level-Footnote-11180320 -Node: Basic Data Typing1180505 -Node: Glossary1183833 -Node: Copying1208991 -Node: GNU Free Documentation License1246547 -Node: Index1271683 +Node: Leftmost Longest175687 +Node: Computed Regexps176989 +Node: GNU Regexp Operators180418 +Node: Case-sensitivity184090 +Ref: Case-sensitivity-Footnote-1186975 +Ref: Case-sensitivity-Footnote-2187210 +Node: Regexp Summary187318 +Node: Reading Files188785 +Node: Records190878 +Node: awk split records191611 +Node: gawk split records196540 +Ref: gawk split records-Footnote-1201079 +Node: Fields201116 +Ref: Fields-Footnote-1203894 +Node: Nonconstant Fields203980 +Ref: Nonconstant Fields-Footnote-1206218 +Node: Changing Fields206421 +Node: Field Separators212352 +Node: Default Field Splitting215056 +Node: Regexp Field Splitting216173 +Node: Single Character Fields219523 +Node: Command Line Field Separator220582 +Node: Full Line Fields223799 +Ref: Full Line Fields-Footnote-1225320 +Ref: Full Line Fields-Footnote-2225366 +Node: Field Splitting Summary225467 +Node: Constant Size227541 +Node: Splitting By Content232124 +Ref: Splitting By Content-Footnote-1236089 +Node: Multiple Line236252 +Ref: Multiple Line-Footnote-1242133 +Node: Getline242312 +Node: Plain Getline244519 +Node: Getline/Variable247159 +Node: Getline/File248308 +Node: Getline/Variable/File249693 +Ref: Getline/Variable/File-Footnote-1251296 +Node: Getline/Pipe251383 +Node: Getline/Variable/Pipe254061 +Node: Getline/Coprocess255192 +Node: Getline/Variable/Coprocess256456 +Node: Getline Notes257195 +Node: Getline Summary259989 +Ref: table-getline-variants260401 +Node: Read Timeout261230 +Ref: Read Timeout-Footnote-1265067 +Node: Command-line directories265125 +Node: Input Summary266030 +Node: Input Exercises269415 +Node: Printing270143 +Node: Print271920 +Node: Print Examples273377 +Node: Output Separators276156 +Node: OFMT278174 +Node: Printf279529 +Node: Basic Printf280314 +Node: Control Letters281886 +Node: Format Modifiers285871 +Node: Printf Examples291881 +Node: Redirection294367 +Node: Special FD301205 +Ref: Special FD-Footnote-1304371 +Node: Special Files304445 +Node: Other Inherited Files305062 +Node: Special Network306062 +Node: Special Caveats306924 +Node: Close Files And Pipes307873 +Ref: Close Files And Pipes-Footnote-1315064 +Ref: Close Files And Pipes-Footnote-2315212 +Node: Output Summary315362 +Node: Output Exercises316360 +Node: Expressions317040 +Node: Values318225 +Node: Constants318903 +Node: Scalar Constants319594 +Ref: Scalar Constants-Footnote-1320453 +Node: Nondecimal-numbers320703 +Node: Regexp Constants323721 +Node: Using Constant Regexps324246 +Node: Variables327389 +Node: Using Variables328044 +Node: Assignment Options329955 +Node: Conversion331830 +Node: Strings And Numbers332354 +Ref: Strings And Numbers-Footnote-1335419 +Node: Locale influences conversions335528 +Ref: table-locale-affects338275 +Node: All Operators338863 +Node: Arithmetic Ops339493 +Node: Concatenation341998 +Ref: Concatenation-Footnote-1344817 +Node: Assignment Ops344923 +Ref: table-assign-ops349902 +Node: Increment Ops351174 +Node: Truth Values and Conditions354612 +Node: Truth Values355697 +Node: Typing and Comparison356746 +Node: Variable Typing357556 +Node: Comparison Operators361209 +Ref: table-relational-ops361619 +Node: POSIX String Comparison365114 +Ref: POSIX String Comparison-Footnote-1366186 +Node: Boolean Ops366324 +Ref: Boolean Ops-Footnote-1370803 +Node: Conditional Exp370894 +Node: Function Calls372621 +Node: Precedence376501 +Node: Locales380162 +Node: Expressions Summary381794 +Node: Patterns and Actions384354 +Node: Pattern Overview385474 +Node: Regexp Patterns387153 +Node: Expression Patterns387696 +Node: Ranges391406 +Node: BEGIN/END394512 +Node: Using BEGIN/END395273 +Ref: Using BEGIN/END-Footnote-1398007 +Node: I/O And BEGIN/END398113 +Node: BEGINFILE/ENDFILE400427 +Node: Empty403328 +Node: Using Shell Variables403645 +Node: Action Overview405918 +Node: Statements408244 +Node: If Statement410092 +Node: While Statement411587 +Node: Do Statement413616 +Node: For Statement414760 +Node: Switch Statement417917 +Node: Break Statement420299 +Node: Continue Statement422340 +Node: Next Statement424167 +Node: Nextfile Statement426548 +Node: Exit Statement429178 +Node: Built-in Variables431581 +Node: User-modified432714 +Ref: User-modified-Footnote-1440395 +Node: Auto-set440457 +Ref: Auto-set-Footnote-1453492 +Ref: Auto-set-Footnote-2453697 +Node: ARGC and ARGV453753 +Node: Pattern Action Summary457971 +Node: Arrays460398 +Node: Array Basics461727 +Node: Array Intro462571 +Ref: figure-array-elements464535 +Ref: Array Intro-Footnote-1467061 +Node: Reference to Elements467189 +Node: Assigning Elements469641 +Node: Array Example470132 +Node: Scanning an Array471890 +Node: Controlling Scanning474906 +Ref: Controlling Scanning-Footnote-1480102 +Node: Numeric Array Subscripts480418 +Node: Uninitialized Subscripts482603 +Node: Delete484220 +Ref: Delete-Footnote-1486963 +Node: Multidimensional487020 +Node: Multiscanning490117 +Node: Arrays of Arrays491706 +Node: Arrays Summary496465 +Node: Functions498557 +Node: Built-in499456 +Node: Calling Built-in500534 +Node: Numeric Functions502525 +Ref: Numeric Functions-Footnote-1506542 +Ref: Numeric Functions-Footnote-2506899 +Ref: Numeric Functions-Footnote-3506947 +Node: String Functions507219 +Ref: String Functions-Footnote-1530694 +Ref: String Functions-Footnote-2530823 +Ref: String Functions-Footnote-3531071 +Node: Gory Details531158 +Ref: table-sub-escapes532939 +Ref: table-sub-proposed534459 +Ref: table-posix-sub535823 +Ref: table-gensub-escapes537359 +Ref: Gory Details-Footnote-1538191 +Node: I/O Functions538342 +Ref: I/O Functions-Footnote-1545560 +Node: Time Functions545707 +Ref: Time Functions-Footnote-1556195 +Ref: Time Functions-Footnote-2556263 +Ref: Time Functions-Footnote-3556421 +Ref: Time Functions-Footnote-4556532 +Ref: Time Functions-Footnote-5556644 +Ref: Time Functions-Footnote-6556871 +Node: Bitwise Functions557137 +Ref: table-bitwise-ops557699 +Ref: Bitwise Functions-Footnote-1562008 +Node: Type Functions562177 +Node: I18N Functions563328 +Node: User-defined564973 +Node: Definition Syntax565778 +Ref: Definition Syntax-Footnote-1571185 +Node: Function Example571256 +Ref: Function Example-Footnote-1574175 +Node: Function Caveats574197 +Node: Calling A Function574715 +Node: Variable Scope575673 +Node: Pass By Value/Reference578661 +Node: Return Statement582156 +Node: Dynamic Typing585137 +Node: Indirect Calls586066 +Ref: Indirect Calls-Footnote-1597368 +Node: Functions Summary597496 +Node: Library Functions600198 +Ref: Library Functions-Footnote-1603807 +Ref: Library Functions-Footnote-2603950 +Node: Library Names604121 +Ref: Library Names-Footnote-1607575 +Ref: Library Names-Footnote-2607798 +Node: General Functions607884 +Node: Strtonum Function608987 +Node: Assert Function612009 +Node: Round Function615333 +Node: Cliff Random Function616874 +Node: Ordinal Functions617890 +Ref: Ordinal Functions-Footnote-1620953 +Ref: Ordinal Functions-Footnote-2621205 +Node: Join Function621416 +Ref: Join Function-Footnote-1623185 +Node: Getlocaltime Function623385 +Node: Readfile Function627129 +Node: Shell Quoting629099 +Node: Data File Management630500 +Node: Filetrans Function631132 +Node: Rewind Function635188 +Node: File Checking636575 +Ref: File Checking-Footnote-1637907 +Node: Empty Files638108 +Node: Ignoring Assigns640087 +Node: Getopt Function641638 +Ref: Getopt Function-Footnote-1653100 +Node: Passwd Functions653300 +Ref: Passwd Functions-Footnote-1662137 +Node: Group Functions662225 +Ref: Group Functions-Footnote-1670119 +Node: Walking Arrays670332 +Node: Library Functions Summary671935 +Node: Library Exercises673336 +Node: Sample Programs674616 +Node: Running Examples675386 +Node: Clones676114 +Node: Cut Program677338 +Node: Egrep Program687057 +Ref: Egrep Program-Footnote-1694555 +Node: Id Program694665 +Node: Split Program698310 +Ref: Split Program-Footnote-1701758 +Node: Tee Program701886 +Node: Uniq Program704675 +Node: Wc Program712094 +Ref: Wc Program-Footnote-1716344 +Node: Miscellaneous Programs716438 +Node: Dupword Program717651 +Node: Alarm Program719682 +Node: Translate Program724486 +Ref: Translate Program-Footnote-1729051 +Node: Labels Program729321 +Ref: Labels Program-Footnote-1732672 +Node: Word Sorting732756 +Node: History Sorting736827 +Node: Extract Program738663 +Node: Simple Sed746188 +Node: Igawk Program749256 +Ref: Igawk Program-Footnote-1763580 +Ref: Igawk Program-Footnote-2763781 +Ref: Igawk Program-Footnote-3763903 +Node: Anagram Program764018 +Node: Signature Program767075 +Node: Programs Summary768322 +Node: Programs Exercises769515 +Ref: Programs Exercises-Footnote-1773646 +Node: Advanced Features773737 +Node: Nondecimal Data775685 +Node: Array Sorting777275 +Node: Controlling Array Traversal777972 +Ref: Controlling Array Traversal-Footnote-1786305 +Node: Array Sorting Functions786423 +Ref: Array Sorting Functions-Footnote-1790312 +Node: Two-way I/O790508 +Ref: Two-way I/O-Footnote-1795453 +Ref: Two-way I/O-Footnote-2795639 +Node: TCP/IP Networking795721 +Node: Profiling798594 +Node: Advanced Features Summary806141 +Node: Internationalization808074 +Node: I18N and L10N809554 +Node: Explaining gettext810240 +Ref: Explaining gettext-Footnote-1815265 +Ref: Explaining gettext-Footnote-2815449 +Node: Programmer i18n815614 +Ref: Programmer i18n-Footnote-1820480 +Node: Translator i18n820529 +Node: String Extraction821323 +Ref: String Extraction-Footnote-1822454 +Node: Printf Ordering822540 +Ref: Printf Ordering-Footnote-1825326 +Node: I18N Portability825390 +Ref: I18N Portability-Footnote-1827845 +Node: I18N Example827908 +Ref: I18N Example-Footnote-1830711 +Node: Gawk I18N830783 +Node: I18N Summary831421 +Node: Debugger832760 +Node: Debugging833782 +Node: Debugging Concepts834223 +Node: Debugging Terms836076 +Node: Awk Debugging838648 +Node: Sample Debugging Session839542 +Node: Debugger Invocation840062 +Node: Finding The Bug841446 +Node: List of Debugger Commands847921 +Node: Breakpoint Control849254 +Node: Debugger Execution Control852950 +Node: Viewing And Changing Data856314 +Node: Execution Stack859692 +Node: Debugger Info861329 +Node: Miscellaneous Debugger Commands865346 +Node: Readline Support870375 +Node: Limitations871267 +Node: Debugging Summary873381 +Node: Arbitrary Precision Arithmetic874549 +Node: Computer Arithmetic875965 +Ref: table-numeric-ranges879563 +Ref: Computer Arithmetic-Footnote-1880422 +Node: Math Definitions880479 +Ref: table-ieee-formats883767 +Ref: Math Definitions-Footnote-1884371 +Node: MPFR features884476 +Node: FP Math Caution886147 +Ref: FP Math Caution-Footnote-1887197 +Node: Inexactness of computations887566 +Node: Inexact representation888525 +Node: Comparing FP Values889882 +Node: Errors accumulate890964 +Node: Getting Accuracy892397 +Node: Try To Round895059 +Node: Setting precision895958 +Ref: table-predefined-precision-strings896642 +Node: Setting the rounding mode898431 +Ref: table-gawk-rounding-modes898795 +Ref: Setting the rounding mode-Footnote-1902250 +Node: Arbitrary Precision Integers902429 +Ref: Arbitrary Precision Integers-Footnote-1905415 +Node: POSIX Floating Point Problems905564 +Ref: POSIX Floating Point Problems-Footnote-1909437 +Node: Floating point summary909475 +Node: Dynamic Extensions911669 +Node: Extension Intro913221 +Node: Plugin License914487 +Node: Extension Mechanism Outline915284 +Ref: figure-load-extension915712 +Ref: figure-register-new-function917192 +Ref: figure-call-new-function918196 +Node: Extension API Description920182 +Node: Extension API Functions Introduction921632 +Node: General Data Types926456 +Ref: General Data Types-Footnote-1932195 +Node: Memory Allocation Functions932494 +Ref: Memory Allocation Functions-Footnote-1935333 +Node: Constructor Functions935429 +Node: Registration Functions937163 +Node: Extension Functions937848 +Node: Exit Callback Functions940145 +Node: Extension Version String941393 +Node: Input Parsers942058 +Node: Output Wrappers951937 +Node: Two-way processors956452 +Node: Printing Messages958656 +Ref: Printing Messages-Footnote-1959732 +Node: Updating `ERRNO'959884 +Node: Requesting Values960624 +Ref: table-value-types-returned961352 +Node: Accessing Parameters962309 +Node: Symbol Table Access963540 +Node: Symbol table by name964054 +Node: Symbol table by cookie966035 +Ref: Symbol table by cookie-Footnote-1970179 +Node: Cached values970242 +Ref: Cached values-Footnote-1973741 +Node: Array Manipulation973832 +Ref: Array Manipulation-Footnote-1974930 +Node: Array Data Types974967 +Ref: Array Data Types-Footnote-1977622 +Node: Array Functions977714 +Node: Flattening Arrays981568 +Node: Creating Arrays988460 +Node: Extension API Variables993231 +Node: Extension Versioning993867 +Node: Extension API Informational Variables995768 +Node: Extension API Boilerplate996833 +Node: Finding Extensions1000642 +Node: Extension Example1001202 +Node: Internal File Description1001974 +Node: Internal File Ops1006041 +Ref: Internal File Ops-Footnote-11017711 +Node: Using Internal File Ops1017851 +Ref: Using Internal File Ops-Footnote-11020234 +Node: Extension Samples1020507 +Node: Extension Sample File Functions1022033 +Node: Extension Sample Fnmatch1029671 +Node: Extension Sample Fork1031162 +Node: Extension Sample Inplace1032377 +Node: Extension Sample Ord1034052 +Node: Extension Sample Readdir1034888 +Ref: table-readdir-file-types1035764 +Node: Extension Sample Revout1036575 +Node: Extension Sample Rev2way1037165 +Node: Extension Sample Read write array1037905 +Node: Extension Sample Readfile1039845 +Node: Extension Sample Time1040940 +Node: Extension Sample API Tests1042289 +Node: gawkextlib1042780 +Node: Extension summary1045438 +Node: Extension Exercises1049127 +Node: Language History1049849 +Node: V7/SVR3.11051505 +Node: SVR41053686 +Node: POSIX1055131 +Node: BTL1056520 +Node: POSIX/GNU1057254 +Node: Feature History1062818 +Node: Common Extensions1075916 +Node: Ranges and Locales1077240 +Ref: Ranges and Locales-Footnote-11081858 +Ref: Ranges and Locales-Footnote-21081885 +Ref: Ranges and Locales-Footnote-31082119 +Node: Contributors1082340 +Node: History summary1087881 +Node: Installation1089251 +Node: Gawk Distribution1090197 +Node: Getting1090681 +Node: Extracting1091504 +Node: Distribution contents1093139 +Node: Unix Installation1098856 +Node: Quick Installation1099473 +Node: Additional Configuration Options1101897 +Node: Configuration Philosophy1103635 +Node: Non-Unix Installation1106004 +Node: PC Installation1106462 +Node: PC Binary Installation1107781 +Node: PC Compiling1109629 +Ref: PC Compiling-Footnote-11112650 +Node: PC Testing1112759 +Node: PC Using1113935 +Node: Cygwin1118050 +Node: MSYS1118873 +Node: VMS Installation1119373 +Node: VMS Compilation1120165 +Ref: VMS Compilation-Footnote-11121387 +Node: VMS Dynamic Extensions1121445 +Node: VMS Installation Details1123129 +Node: VMS Running1125381 +Node: VMS GNV1128217 +Node: VMS Old Gawk1128951 +Node: Bugs1129421 +Node: Other Versions1133304 +Node: Installation summary1139728 +Node: Notes1140784 +Node: Compatibility Mode1141649 +Node: Additions1142431 +Node: Accessing The Source1143356 +Node: Adding Code1144791 +Node: New Ports1150948 +Node: Derived Files1155430 +Ref: Derived Files-Footnote-11160905 +Ref: Derived Files-Footnote-21160939 +Ref: Derived Files-Footnote-31161535 +Node: Future Extensions1161649 +Node: Implementation Limitations1162255 +Node: Extension Design1163503 +Node: Old Extension Problems1164657 +Ref: Old Extension Problems-Footnote-11166174 +Node: Extension New Mechanism Goals1166231 +Ref: Extension New Mechanism Goals-Footnote-11169591 +Node: Extension Other Design Decisions1169780 +Node: Extension Future Growth1171888 +Node: Old Extension Mechanism1172724 +Node: Notes summary1174486 +Node: Basic Concepts1175672 +Node: Basic High Level1176353 +Ref: figure-general-flow1176625 +Ref: figure-process-flow1177224 +Ref: Basic High Level-Footnote-11180453 +Node: Basic Data Typing1180638 +Node: Glossary1183966 +Node: Copying1209124 +Node: GNU Free Documentation License1246680 +Node: Index1271816  End Tag Table -- cgit v1.2.3 From 65f80a8ce75f050e30a400ff5eee3c08366bb518 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 23 Jan 2015 14:06:20 +0200 Subject: Add more entries to the glossary. --- doc/gawk.info | 227 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 187 insertions(+), 40 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 2a17cbcf..365ca95c 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -29443,6 +29443,21 @@ ANSI C++ programming languages. These standards often become international standards as well. See also "ISO." +Argument + An argument can be two different things. It can be an option or a + file name passed to a command while invoking it from the command + line, or it can be something passed to a "function" inside a + program, e.g. inside `awk'. + + In the latter case, an argument can be passed to a function in two + ways. Either it is given to the called function by value, i.e., a + copy of the value of the variable is made available to the called + function, but the original variable cannot be modified by the + function itself; or it is given by reference, i.e., a pointer to + the interested variable is passed to the function, which can then + directly modify it. In `awk' scalars are passed by value, and + arrays are passed by reference. See "Pass By Value/Reference." + Array A grouping of multiple values under the same name. Most languages just provide sequential arrays. `awk' provides associative arrays. @@ -29478,6 +29493,26 @@ Bash The GNU version of the standard shell (the Bourne-Again SHell). See also "Bourne Shell." +Binary + Base-two notation, where the digits are `0'-`1'. Since electronic + circuitry works "naturally" in base 2 (just think of Off/On), + everything inside a computer is calculated using base 2. Each digit + represents the presence (or absence) of a power of 2 and is called + a "bit". So, for example, the base-two number `10101' is the same + as decimal 21, ((1 x 16) + (1 x 4) + (1 x 1)). + + Since base-two numbers quickly become very long to read and write, + they are usually grouped by 3 (i.e., they are read as octal + numbers), or by 4 (i.e., they are read as hexadecimal numbers). + There is no direct way to insert base 2 numbers in a C program. + If need arises, such numbers are usually inserted as octal or + hexadecimal numbers. The number of base-two digits that fit into + registers used for representing integer numbers in computers is a + rough indication of the computing power of the computer itself. + Most computers nowadays use 64 bits for representing integer + numbers in their registers, but 32-bit, 16-bit and 8-bit registers + have been widely used in the past. *Note Nondecimal-numbers::. + Bit Short for "Binary Digit." All values in computer memory ultimately reduce to binary digits: values that are either zero or @@ -29506,6 +29541,19 @@ Braces The characters `{' and `}'. Braces are used in `awk' for delimiting actions, compound statements, and function bodies. +Bracket Expression + Inside a "regular expression", an expression included in square + brackets, meant to designate a single character as belonging to a + specified character class. A bracket expression can contain a list + of one or more characters, like `[abc]', a range of characters, + like `[A-Z]', or a name, delimited by `:', that designates a known + set of characters, like `[:digit:]'. The form of bracket expression + enclosed between `:' is independent of the underlying + representation of the character themselves, which could utilize + the ASCII, ECBDIC, or Unicode codesets, depending on the + architecture of the computer system, and on localization. See + also "Regular Expression." + Built-in Function The `awk' language provides built-in functions that perform various numerical, I/O-related, and string computations. Examples are @@ -29533,9 +29581,25 @@ C In general, `gawk' attempts to be as similar to the 1990 version of ISO C as makes sense. +C Shell + The C Shell (`csh' or its improved version, `tcsh') is a Unix + shell that was created by Bill Joy in the late 1970s. The C shell + was differentiated from other shells by its interactive features + and overall style, which looks more like C. The C Shell is not + backward compatible with the Bourne Shell, so special attention is + required when converting scripts written for other Unix shells to + the C shell, especially with regard to the management of shell + variables. See also "Bourne Shell." + C++ A popular object-oriented programming language derived from C. +Character Class + See "Bracket Expression." + +Character List + See "Bracket Expression." + Character Set The set of numeric codes used by a computer system to represent the characters (letters, numbers, punctuation, etc.) of a particular @@ -29563,10 +29627,21 @@ Compiler machine-executable object code. The object code is then executed directly by the computer. See also "Interpreter." +Complemented Bracket Expression + The negation of a "bracket expression". All that is _not_ + described by a given bracket expression. The symbol `^' precedes + the negated bracket expression. E.g.: `[[^:digit:]' designates + whatever character is not a digit. `[^bad]' designates whatever + character is not one of the letters `b', `a', or `d'. See + "Bracket Expression." + Compound Statement A series of `awk' statements, enclosed in curly braces. Compound statements may be nested. (*Note Statements::.) +Computed Regexps + See "Dynamic Regular Expressions." + Concatenation Concatenating two strings means sticking them together, one after another, producing a new string. For example, the string `foo' @@ -29580,6 +29655,12 @@ Conditional Expression otherwise the value is EXPR3. In either case, only one of EXPR2 and EXPR3 is evaluated. (*Note Conditional Exp::.) +Control Statement + A control statement is an instruction to perform a given operation + or a set of operations inside an `awk' program, if a given + condition is true. Control statements are: `if', `for', `while', + and `do' (*note Statements::). + Cookie A peculiar goodie, token, saying or remembrance produced by or presented to a program. (With thanks to Professor Doug McIlroy.) @@ -29686,6 +29767,12 @@ Format are controlled by the format strings contained in the predefined variables `CONVFMT' and `OFMT'. (*Note Control Letters::.) +Fortran + Shorthand for FORmula TRANslator, one of the first programming + languages available for scientific calculations. It was created by + John Backus, and has been available since 1957. It is still in use + today. + Free Documentation License This document describes the terms under which this Info file is published and may be copied. (*Note GNU Free Documentation @@ -29701,9 +29788,16 @@ FSF See "Free Software Foundation." Function - A specialized group of statements used to encapsulate general or - program-specific tasks. `awk' has a number of built-in functions, - and also allows you to define your own. (*Note Functions::.) + A part of an `awk' program that can be invoked from every point of + the program, to perform a task. `awk' has several built-in + functions. Users can define their own functions in every part of + the program. Function can be recursive, i.e., they may invoke + themselves. *Note Functions::. In `gawk' it is also possible to + have functions shared among different programs, and included where + required using the `@include' directive (*note Include Files::). + In `gawk' the name of the function that should be invoked can be + generated at run time, i.e., dynamically. The `gawk' extension + API provides constructor functions (*note Constructor Functions::). `gawk' The GNU implementation of `awk'. @@ -29799,6 +29893,12 @@ Keyword `else', `exit', `for...in', `for', `function', `func', `if', `next', `nextfile', `switch', and `while'. +Korn Shell + The Korn Shell (`ksh') is a Unix shell which was developed by + David Korn at Bell Laboratories in the early 1980s. The Korn Shell + is backward-compatible with the Bourne shell and includes many + features of the C shell. See also "Bourne Shell." + Lesser General Public License This document describes the terms under which binary library archives or shared objects, and their source code may be @@ -29836,6 +29936,13 @@ Metacharacters Instead, they denote regular expression operations, such as repetition, grouping, or alternation. +Nesting + Nesting is where information is organized in layers, or where + objects contain other similar objects. In `gawk' the `@include' + directive can be nested. The "natural" nesting of arithmetic and + logical operations can be changed using parentheses (*note + Precedence::). + No-op An operation that does nothing. @@ -29855,6 +29962,11 @@ Octal are written in C using a leading `0', to indicate their base. Thus, `013' is 11 ((1 x 8) + 3). *Note Nondecimal-numbers::. +Output Record + A single chunk of data that is written out by `awk'. Usually, an + `awk' output record consists of one or more lines of text. *Note + Records::. + Pattern Patterns tell `awk' which input records are interesting to which rules. @@ -29870,6 +29982,9 @@ PEBKAC computer usage problems. (Problem Exists Between Keyboard And Chair.) +Plug-in + See "Extensions." + POSIX The name for a series of standards that specify a Portable Operating System interface. The "IX" denotes the Unix heritage of @@ -29893,6 +30008,9 @@ Range (of input lines) can specify ranges of input lines for `awk' to process or it can specify single lines. (*Note Pattern Overview::.) +Record + See "Input record" and "Output record." + Recursion When a function calls itself, either directly or indirectly. If this is clear, stop, and proceed to the next entry. Otherwise, @@ -29909,6 +30027,16 @@ Redirection using the `>', `>>', `|', and `|&' operators. (*Note Getline::, and *note Redirection::.) +Reference Counts + An internal mechanism in `gawk' to minimize the amount of memory + needed to store the value of string variables. If the value + assumed by a variable is used in more than one place, only one + copy of the value itself is kept, and the associated reference + count is increased when the same value is used by an additional + variable, and decresed when the related variable is no longer in + use. When the reference count goes to zero, the memory space used + to store the value of the variable is freed. + Regexp See "Regular Expression." @@ -29927,6 +30055,15 @@ Regular Expression Constant when you write the `awk' program and cannot be changed during its execution. (*Note Regexp Usage::.) +Regular Expression Operators + See "Metacharacters." + +Rounding + Rounding the result of an arithmetic operation can be tricky. + More than one way of rounding exists, and in `gawk' it is possible + to choose which method should be used in a program. *Note Setting + the rounding mode::. + Rule A segment of an `awk' program that specifies how to process single input records. A rule consists of a "pattern" and an "action". @@ -29988,6 +30125,11 @@ Special File handed directly to the underlying operating system--for example, `/dev/stderr'. (*Note Special Files::.) +Statement + An expression inside an `awk' program in the action part of a + pattern-action rule, or inside an `awk' function. A statement can + be a variable assignment, an array operation, a loop, etc. + Stream Editor A program that reads records from an input stream and processes them one or more at a time. This is in contrast with batch @@ -30030,10 +30172,15 @@ UTC reference time for day and date calculations. See also "Epoch" and "GMT." +Variable + A name for a value. In `awk', variables may be either scalars or + arrays. + Whitespace A sequence of space, TAB, or newline characters occurring inside an input record or a string. +  File: gawk.info, Node: Copying, Next: GNU Free Documentation License, Prev: Glossary, Up: Top @@ -31629,7 +31776,7 @@ Index (line 18) * artificial intelligence, gawk and: Distribution contents. (line 52) -* ASCII <1>: Glossary. (line 133) +* ASCII <1>: Glossary. (line 197) * ASCII: Ordinal Functions. (line 45) * asort <1>: Array Sorting Functions. (line 6) @@ -31801,7 +31948,7 @@ Index * BEGINFILE pattern, Boolean patterns and: Expression Patterns. (line 69) * beginfile() user-defined function: Filetrans Function. (line 61) -* Bentley, Jon: Glossary. (line 143) +* Bentley, Jon: Glossary. (line 207) * Benzinger, Michael: Contributors. (line 97) * Berry, Karl <1>: Ranges and Locales. (line 74) * Berry, Karl: Acknowledgments. (line 33) @@ -31883,7 +32030,7 @@ Index * Brink, Jeroen: DOS Quoting. (line 10) * Broder, Alan J.: Contributors. (line 88) * Brown, Martin: Contributors. (line 82) -* BSD-based operating systems: Glossary. (line 611) +* BSD-based operating systems: Glossary. (line 753) * bt debugger command (alias for backtrace): Execution Stack. (line 13) * Buening, Andreas <1>: Bugs. (line 70) * Buening, Andreas <2>: Contributors. (line 92) @@ -31925,7 +32072,7 @@ Index (line 56) * character lists in regular expression: Bracket Expressions. (line 6) * character lists, See bracket expressions: Regexp Operators. (line 56) -* character sets (machine character encodings) <1>: Glossary. (line 133) +* character sets (machine character encodings) <1>: Glossary. (line 197) * character sets (machine character encodings): Ordinal Functions. (line 45) * character sets, See Also bracket expressions: Regexp Operators. @@ -31936,7 +32083,7 @@ Index * Chassell, Robert J.: Acknowledgments. (line 33) * chdir() extension function: Extension Sample File Functions. (line 12) -* chem utility: Glossary. (line 143) +* chem utility: Glossary. (line 207) * chr() extension function: Extension Sample Ord. (line 15) * chr() user-defined function: Ordinal Functions. (line 16) @@ -32013,7 +32160,7 @@ Index * compatibility mode (gawk), octal numbers: Nondecimal-numbers. (line 60) * compatibility mode (gawk), specifying: Options. (line 81) -* compiled programs <1>: Glossary. (line 155) +* compiled programs <1>: Glossary. (line 219) * compiled programs: Basic High Level. (line 15) * compiling gawk for Cygwin: Cygwin. (line 6) * compiling gawk for MS-DOS and MS-Windows: PC Compiling. (line 13) @@ -32059,7 +32206,7 @@ Index * CONVFMT variable: Strings And Numbers. (line 29) * CONVFMT variable, and array subscripts: Numeric Array Subscripts. (line 6) -* cookie: Glossary. (line 177) +* cookie: Glossary. (line 258) * coprocesses <1>: Two-way I/O. (line 25) * coprocesses: Redirection. (line 96) * coprocesses, closing: Close Files And Pipes. @@ -32083,7 +32230,7 @@ Index * cut.awk program: Cut Program. (line 45) * d debugger command (alias for delete): Breakpoint Control. (line 64) * d.c., See dark corner: Conventions. (line 42) -* dark corner <1>: Glossary. (line 188) +* dark corner <1>: Glossary. (line 269) * dark corner: Conventions. (line 42) * dark corner, "0" is actually true: Truth Values. (line 24) * dark corner, /= operator vs. /=.../ regexp constant: Assignment Ops. @@ -32429,7 +32576,7 @@ Index * environment variables used by gawk: Environment Variables. (line 6) * environment variables, in ENVIRON array: Auto-set. (line 60) -* epoch, definition of: Glossary. (line 234) +* epoch, definition of: Glossary. (line 315) * equals sign (=), = operator: Assignment Ops. (line 6) * equals sign (=), == operator <1>: Precedence. (line 65) * equals sign (=), == operator: Comparison Operators. @@ -32675,10 +32822,10 @@ Index * frame debugger command: Execution Stack. (line 27) * Free Documentation License (FDL): GNU Free Documentation License. (line 7) -* Free Software Foundation (FSF) <1>: Glossary. (line 288) +* Free Software Foundation (FSF) <1>: Glossary. (line 375) * Free Software Foundation (FSF) <2>: Getting. (line 10) * Free Software Foundation (FSF): Manual History. (line 6) -* FreeBSD: Glossary. (line 611) +* FreeBSD: Glossary. (line 753) * FS variable <1>: User-modified. (line 50) * FS variable: Field Separators. (line 15) * FS variable, --field-separator option and: Options. (line 21) @@ -32692,7 +32839,7 @@ Index * FS, containing ^: Regexp Field Splitting. (line 59) * FS, in multiline records: Multiple Line. (line 41) -* FSF (Free Software Foundation) <1>: Glossary. (line 288) +* FSF (Free Software Foundation) <1>: Glossary. (line 375) * FSF (Free Software Foundation) <2>: Getting. (line 10) * FSF (Free Software Foundation): Manual History. (line 6) * fts() extension function: Extension Sample File Functions. @@ -32839,7 +32986,7 @@ Index (line 63) * gawkextlib: gawkextlib. (line 6) * gawkextlib project: gawkextlib. (line 6) -* General Public License (GPL): Glossary. (line 305) +* General Public License (GPL): Glossary. (line 399) * General Public License, See GPL: Manual History. (line 11) * generate time values: Time Functions. (line 25) * gensub <1>: String Functions. (line 90) @@ -32897,18 +33044,18 @@ Index * GNU awk, See gawk: Preface. (line 51) * GNU Free Documentation License: GNU Free Documentation License. (line 7) -* GNU General Public License: Glossary. (line 305) -* GNU Lesser General Public License: Glossary. (line 396) +* GNU General Public License: Glossary. (line 399) +* GNU Lesser General Public License: Glossary. (line 496) * GNU long options <1>: Options. (line 6) * GNU long options: Command Line. (line 13) * GNU long options, printing list of: Options. (line 154) -* GNU Project <1>: Glossary. (line 314) +* GNU Project <1>: Glossary. (line 408) * GNU Project: Manual History. (line 11) -* GNU/Linux <1>: Glossary. (line 611) +* GNU/Linux <1>: Glossary. (line 753) * GNU/Linux <2>: I18N Example. (line 55) * GNU/Linux: Manual History. (line 28) * Gordon, Assaf: Contributors. (line 105) -* GPL (General Public License) <1>: Glossary. (line 305) +* GPL (General Public License) <1>: Glossary. (line 399) * GPL (General Public License): Manual History. (line 11) * GPL (General Public License), printing: Options. (line 88) * grcat program: Group Functions. (line 16) @@ -33040,20 +33187,20 @@ Index * internationalization, localization, portability and: I18N Portability. (line 6) * internationalizing a program: Explaining gettext. (line 6) -* interpreted programs <1>: Glossary. (line 356) +* interpreted programs <1>: Glossary. (line 450) * interpreted programs: Basic High Level. (line 15) * interval expressions, regexp operator: Regexp Operators. (line 116) * inventory-shipped file: Sample Data Files. (line 32) * invoke shell command: I/O Functions. (line 106) * isarray: Type Functions. (line 11) -* ISO: Glossary. (line 367) -* ISO 8859-1: Glossary. (line 133) -* ISO Latin-1: Glossary. (line 133) +* ISO: Glossary. (line 461) +* ISO 8859-1: Glossary. (line 197) +* ISO Latin-1: Glossary. (line 197) * Jacobs, Andrew: Passwd Functions. (line 90) * Jaegermann, Michal <1>: Contributors. (line 45) * Jaegermann, Michal: Acknowledgments. (line 60) * Java implementation of awk: Other Versions. (line 117) -* Java programming language: Glossary. (line 379) +* Java programming language: Glossary. (line 473) * jawk: Other Versions. (line 117) * Jedi knights: Undocumented. (line 6) * Johansen, Chris: Signature Program. (line 25) @@ -33062,7 +33209,7 @@ Index * Kahrs, Ju"rgen: Acknowledgments. (line 60) * Kasal, Stepan: Acknowledgments. (line 60) * Kenobi, Obi-Wan: Undocumented. (line 6) -* Kernighan, Brian <1>: Glossary. (line 143) +* Kernighan, Brian <1>: Glossary. (line 207) * Kernighan, Brian <2>: Basic Data Typing. (line 54) * Kernighan, Brian <3>: Other Versions. (line 13) * Kernighan, Brian <4>: Contributors. (line 11) @@ -33103,8 +33250,8 @@ Index * length: String Functions. (line 171) * length of input record: String Functions. (line 178) * length of string: String Functions. (line 171) -* Lesser General Public License (LGPL): Glossary. (line 396) -* LGPL (Lesser General Public License): Glossary. (line 396) +* Lesser General Public License (LGPL): Glossary. (line 496) +* LGPL (Lesser General Public License): Glossary. (line 496) * libmawk: Other Versions. (line 125) * libraries of awk functions: Library Functions. (line 6) * libraries of awk functions, assertions: Assert Function. (line 6) @@ -33149,7 +33296,7 @@ Index * lint checking, undefined functions: Pass By Value/Reference. (line 85) * LINT variable: User-modified. (line 88) -* Linux <1>: Glossary. (line 611) +* Linux <1>: Glossary. (line 753) * Linux <2>: I18N Example. (line 55) * Linux: Manual History. (line 28) * list all global variables, in debugger: Debugger Info. (line 48) @@ -33211,7 +33358,7 @@ Index * mawk utility <4>: Getline/Pipe. (line 62) * mawk utility: Escape Sequences. (line 117) * maximum precision supported by MPFR library: Auto-set. (line 221) -* McIlroy, Doug: Glossary. (line 177) +* McIlroy, Doug: Glossary. (line 258) * McPhee, Patrick: Contributors. (line 100) * message object files: Explaining gettext. (line 42) * message object files, converting from portable object files: I18N Example. @@ -33239,7 +33386,7 @@ Index * names, functions: Definition Syntax. (line 23) * namespace issues: Library Names. (line 6) * namespace issues, functions: Definition Syntax. (line 23) -* NetBSD: Glossary. (line 611) +* NetBSD: Glossary. (line 753) * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) * newlines <1>: Boolean Ops. (line 69) @@ -33327,7 +33474,7 @@ Index * OFS variable <1>: User-modified. (line 113) * OFS variable <2>: Output Separators. (line 6) * OFS variable: Changing Fields. (line 64) -* OpenBSD: Glossary. (line 611) +* OpenBSD: Glossary. (line 753) * OpenSolaris: Other Versions. (line 100) * operating systems, BSD-based: Manual History. (line 28) * operating systems, PC, gawk on: PC Using. (line 6) @@ -33600,7 +33747,7 @@ Index * programming languages, Ada: Glossary. (line 11) * programming languages, data-driven vs. procedural: Getting Started. (line 12) -* programming languages, Java: Glossary. (line 379) +* programming languages, Java: Glossary. (line 473) * programming, basic steps: Basic High Level. (line 20) * programming, concepts: Basic Concepts. (line 6) * pwcat program: Passwd Functions. (line 23) @@ -33962,7 +34109,7 @@ Index * square root: Numeric Functions. (line 77) * srand: Numeric Functions. (line 81) * stack frame: Debugging Terms. (line 10) -* Stallman, Richard <1>: Glossary. (line 288) +* Stallman, Richard <1>: Glossary. (line 375) * Stallman, Richard <2>: Contributors. (line 23) * Stallman, Richard <3>: Acknowledgments. (line 18) * Stallman, Richard: Manual History. (line 6) @@ -34147,14 +34294,14 @@ Index * undisplay debugger command: Viewing And Changing Data. (line 80) * undocumented features: Undocumented. (line 6) -* Unicode <1>: Glossary. (line 133) +* Unicode <1>: Glossary. (line 197) * Unicode <2>: Ranges and Locales. (line 61) * Unicode: Ordinal Functions. (line 45) * uninitialized variables, as array subscripts: Uninitialized Subscripts. (line 6) * uniq utility: Uniq Program. (line 6) * uniq.awk program: Uniq Program. (line 65) -* Unix: Glossary. (line 611) +* Unix: Glossary. (line 753) * Unix awk, backslashes in escape sequences: Escape Sequences. (line 117) * Unix awk, close() function and: Close Files And Pipes. @@ -34854,8 +35001,8 @@ Ref: figure-process-flow1177224 Ref: Basic High Level-Footnote-11180453 Node: Basic Data Typing1180638 Node: Glossary1183966 -Node: Copying1209124 -Node: GNU Free Documentation License1246680 -Node: Index1271816 +Node: Copying1215912 +Node: GNU Free Documentation License1253468 +Node: Index1278604  End Tag Table -- cgit v1.2.3 From 2443fb7afd788395e1c6baf067299f42317df21b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 25 Jan 2015 18:55:25 +0200 Subject: Fix a bad URL in the doc. --- doc/gawk.info | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 365ca95c..a6b8fac0 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -29614,7 +29614,7 @@ CHEM A preprocessor for `pic' that reads descriptions of molecules and produces `pic' input for drawing them. It was written in `awk' by Brian Kernighan and Jon Bentley, and is available from - `http://netlib.sandia.gov/netlib/typesetting/chem.gz'. + `http://netlib.org/typesetting/chem'. Comparison Expression A relation that is either true or false, such as `a < b'. @@ -35001,8 +35001,8 @@ Ref: figure-process-flow1177224 Ref: Basic High Level-Footnote-11180453 Node: Basic Data Typing1180638 Node: Glossary1183966 -Node: Copying1215912 -Node: GNU Free Documentation License1253468 -Node: Index1278604 +Node: Copying1215895 +Node: GNU Free Documentation License1253451 +Node: Index1278587  End Tag Table -- cgit v1.2.3 From e7df7131092924b2d4ef1f41bac3d03affa9485b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 25 Jan 2015 19:54:07 +0200 Subject: Fix another bad URL. --- doc/gawk.info | 296 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 148 insertions(+), 148 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 372c6ddc..2af7b429 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -22510,7 +22510,7 @@ set: It's not that well known but it's not that obscure either. It's Euler's modification to Newton's method for calculating pi. Take a look at lines (23) - (25) here: - `http://mathworld.wolfram.com/PiFormulas.htm'. + `http://mathworld.wolfram.com/PiFormulas.html'. The algorithm I wrote simply expands the multiply by 2 and works from the innermost expression outwards. I used this to program HP @@ -35011,152 +35011,152 @@ Node: Setting the rounding mode900775 Ref: table-gawk-rounding-modes901139 Ref: Setting the rounding mode-Footnote-1904594 Node: Arbitrary Precision Integers904773 -Ref: Arbitrary Precision Integers-Footnote-1909672 -Node: POSIX Floating Point Problems909821 -Ref: POSIX Floating Point Problems-Footnote-1913694 -Node: Floating point summary913732 -Node: Dynamic Extensions915926 -Node: Extension Intro917478 -Node: Plugin License918744 -Node: Extension Mechanism Outline919541 -Ref: figure-load-extension919969 -Ref: figure-register-new-function921449 -Ref: figure-call-new-function922453 -Node: Extension API Description924439 -Node: Extension API Functions Introduction925889 -Node: General Data Types930713 -Ref: General Data Types-Footnote-1936452 -Node: Memory Allocation Functions936751 -Ref: Memory Allocation Functions-Footnote-1939590 -Node: Constructor Functions939686 -Node: Registration Functions941420 -Node: Extension Functions942105 -Node: Exit Callback Functions944402 -Node: Extension Version String945650 -Node: Input Parsers946315 -Node: Output Wrappers956194 -Node: Two-way processors960709 -Node: Printing Messages962913 -Ref: Printing Messages-Footnote-1963989 -Node: Updating `ERRNO'964141 -Node: Requesting Values964881 -Ref: table-value-types-returned965609 -Node: Accessing Parameters966566 -Node: Symbol Table Access967797 -Node: Symbol table by name968311 -Node: Symbol table by cookie970292 -Ref: Symbol table by cookie-Footnote-1974436 -Node: Cached values974499 -Ref: Cached values-Footnote-1977998 -Node: Array Manipulation978089 -Ref: Array Manipulation-Footnote-1979187 -Node: Array Data Types979224 -Ref: Array Data Types-Footnote-1981879 -Node: Array Functions981971 -Node: Flattening Arrays985825 -Node: Creating Arrays992717 -Node: Extension API Variables997488 -Node: Extension Versioning998124 -Node: Extension API Informational Variables1000025 -Node: Extension API Boilerplate1001090 -Node: Finding Extensions1004899 -Node: Extension Example1005459 -Node: Internal File Description1006231 -Node: Internal File Ops1010298 -Ref: Internal File Ops-Footnote-11021968 -Node: Using Internal File Ops1022108 -Ref: Using Internal File Ops-Footnote-11024491 -Node: Extension Samples1024764 -Node: Extension Sample File Functions1026290 -Node: Extension Sample Fnmatch1033928 -Node: Extension Sample Fork1035419 -Node: Extension Sample Inplace1036634 -Node: Extension Sample Ord1038309 -Node: Extension Sample Readdir1039145 -Ref: table-readdir-file-types1040021 -Node: Extension Sample Revout1040832 -Node: Extension Sample Rev2way1041422 -Node: Extension Sample Read write array1042162 -Node: Extension Sample Readfile1044102 -Node: Extension Sample Time1045197 -Node: Extension Sample API Tests1046546 -Node: gawkextlib1047037 -Node: Extension summary1049695 -Node: Extension Exercises1053384 -Node: Language History1054106 -Node: V7/SVR3.11055762 -Node: SVR41057943 -Node: POSIX1059388 -Node: BTL1060777 -Node: POSIX/GNU1061511 -Node: Feature History1067135 -Node: Common Extensions1080233 -Node: Ranges and Locales1081557 -Ref: Ranges and Locales-Footnote-11086175 -Ref: Ranges and Locales-Footnote-21086202 -Ref: Ranges and Locales-Footnote-31086436 -Node: Contributors1086657 -Node: History summary1092198 -Node: Installation1093568 -Node: Gawk Distribution1094514 -Node: Getting1094998 -Node: Extracting1095821 -Node: Distribution contents1097456 -Node: Unix Installation1103521 -Node: Quick Installation1104204 -Node: Shell Startup Files1106615 -Node: Additional Configuration Options1107694 -Node: Configuration Philosophy1109433 -Node: Non-Unix Installation1111802 -Node: PC Installation1112260 -Node: PC Binary Installation1113579 -Node: PC Compiling1115427 -Ref: PC Compiling-Footnote-11118448 -Node: PC Testing1118557 -Node: PC Using1119733 -Node: Cygwin1123848 -Node: MSYS1124671 -Node: VMS Installation1125171 -Node: VMS Compilation1125963 -Ref: VMS Compilation-Footnote-11127185 -Node: VMS Dynamic Extensions1127243 -Node: VMS Installation Details1128927 -Node: VMS Running1131179 -Node: VMS GNV1134015 -Node: VMS Old Gawk1134749 -Node: Bugs1135219 -Node: Other Versions1139102 -Node: Installation summary1145526 -Node: Notes1146582 -Node: Compatibility Mode1147447 -Node: Additions1148229 -Node: Accessing The Source1149154 -Node: Adding Code1150589 -Node: New Ports1156746 -Node: Derived Files1161228 -Ref: Derived Files-Footnote-11166703 -Ref: Derived Files-Footnote-21166737 -Ref: Derived Files-Footnote-31167333 -Node: Future Extensions1167447 -Node: Implementation Limitations1168053 -Node: Extension Design1169301 -Node: Old Extension Problems1170455 -Ref: Old Extension Problems-Footnote-11171972 -Node: Extension New Mechanism Goals1172029 -Ref: Extension New Mechanism Goals-Footnote-11175389 -Node: Extension Other Design Decisions1175578 -Node: Extension Future Growth1177686 -Node: Old Extension Mechanism1178522 -Node: Notes summary1180284 -Node: Basic Concepts1181470 -Node: Basic High Level1182151 -Ref: figure-general-flow1182423 -Ref: figure-process-flow1183022 -Ref: Basic High Level-Footnote-11186251 -Node: Basic Data Typing1186436 -Node: Glossary1189764 -Node: Copying1221693 -Node: GNU Free Documentation License1259249 -Node: Index1284385 +Ref: Arbitrary Precision Integers-Footnote-1909673 +Node: POSIX Floating Point Problems909822 +Ref: POSIX Floating Point Problems-Footnote-1913695 +Node: Floating point summary913733 +Node: Dynamic Extensions915927 +Node: Extension Intro917479 +Node: Plugin License918745 +Node: Extension Mechanism Outline919542 +Ref: figure-load-extension919970 +Ref: figure-register-new-function921450 +Ref: figure-call-new-function922454 +Node: Extension API Description924440 +Node: Extension API Functions Introduction925890 +Node: General Data Types930714 +Ref: General Data Types-Footnote-1936453 +Node: Memory Allocation Functions936752 +Ref: Memory Allocation Functions-Footnote-1939591 +Node: Constructor Functions939687 +Node: Registration Functions941421 +Node: Extension Functions942106 +Node: Exit Callback Functions944403 +Node: Extension Version String945651 +Node: Input Parsers946316 +Node: Output Wrappers956195 +Node: Two-way processors960710 +Node: Printing Messages962914 +Ref: Printing Messages-Footnote-1963990 +Node: Updating `ERRNO'964142 +Node: Requesting Values964882 +Ref: table-value-types-returned965610 +Node: Accessing Parameters966567 +Node: Symbol Table Access967798 +Node: Symbol table by name968312 +Node: Symbol table by cookie970293 +Ref: Symbol table by cookie-Footnote-1974437 +Node: Cached values974500 +Ref: Cached values-Footnote-1977999 +Node: Array Manipulation978090 +Ref: Array Manipulation-Footnote-1979188 +Node: Array Data Types979225 +Ref: Array Data Types-Footnote-1981880 +Node: Array Functions981972 +Node: Flattening Arrays985826 +Node: Creating Arrays992718 +Node: Extension API Variables997489 +Node: Extension Versioning998125 +Node: Extension API Informational Variables1000026 +Node: Extension API Boilerplate1001091 +Node: Finding Extensions1004900 +Node: Extension Example1005460 +Node: Internal File Description1006232 +Node: Internal File Ops1010299 +Ref: Internal File Ops-Footnote-11021969 +Node: Using Internal File Ops1022109 +Ref: Using Internal File Ops-Footnote-11024492 +Node: Extension Samples1024765 +Node: Extension Sample File Functions1026291 +Node: Extension Sample Fnmatch1033929 +Node: Extension Sample Fork1035420 +Node: Extension Sample Inplace1036635 +Node: Extension Sample Ord1038310 +Node: Extension Sample Readdir1039146 +Ref: table-readdir-file-types1040022 +Node: Extension Sample Revout1040833 +Node: Extension Sample Rev2way1041423 +Node: Extension Sample Read write array1042163 +Node: Extension Sample Readfile1044103 +Node: Extension Sample Time1045198 +Node: Extension Sample API Tests1046547 +Node: gawkextlib1047038 +Node: Extension summary1049696 +Node: Extension Exercises1053385 +Node: Language History1054107 +Node: V7/SVR3.11055763 +Node: SVR41057944 +Node: POSIX1059389 +Node: BTL1060778 +Node: POSIX/GNU1061512 +Node: Feature History1067136 +Node: Common Extensions1080234 +Node: Ranges and Locales1081558 +Ref: Ranges and Locales-Footnote-11086176 +Ref: Ranges and Locales-Footnote-21086203 +Ref: Ranges and Locales-Footnote-31086437 +Node: Contributors1086658 +Node: History summary1092199 +Node: Installation1093569 +Node: Gawk Distribution1094515 +Node: Getting1094999 +Node: Extracting1095822 +Node: Distribution contents1097457 +Node: Unix Installation1103522 +Node: Quick Installation1104205 +Node: Shell Startup Files1106616 +Node: Additional Configuration Options1107695 +Node: Configuration Philosophy1109434 +Node: Non-Unix Installation1111803 +Node: PC Installation1112261 +Node: PC Binary Installation1113580 +Node: PC Compiling1115428 +Ref: PC Compiling-Footnote-11118449 +Node: PC Testing1118558 +Node: PC Using1119734 +Node: Cygwin1123849 +Node: MSYS1124672 +Node: VMS Installation1125172 +Node: VMS Compilation1125964 +Ref: VMS Compilation-Footnote-11127186 +Node: VMS Dynamic Extensions1127244 +Node: VMS Installation Details1128928 +Node: VMS Running1131180 +Node: VMS GNV1134016 +Node: VMS Old Gawk1134750 +Node: Bugs1135220 +Node: Other Versions1139103 +Node: Installation summary1145527 +Node: Notes1146583 +Node: Compatibility Mode1147448 +Node: Additions1148230 +Node: Accessing The Source1149155 +Node: Adding Code1150590 +Node: New Ports1156747 +Node: Derived Files1161229 +Ref: Derived Files-Footnote-11166704 +Ref: Derived Files-Footnote-21166738 +Ref: Derived Files-Footnote-31167334 +Node: Future Extensions1167448 +Node: Implementation Limitations1168054 +Node: Extension Design1169302 +Node: Old Extension Problems1170456 +Ref: Old Extension Problems-Footnote-11171973 +Node: Extension New Mechanism Goals1172030 +Ref: Extension New Mechanism Goals-Footnote-11175390 +Node: Extension Other Design Decisions1175579 +Node: Extension Future Growth1177687 +Node: Old Extension Mechanism1178523 +Node: Notes summary1180285 +Node: Basic Concepts1181471 +Node: Basic High Level1182152 +Ref: figure-general-flow1182424 +Ref: figure-process-flow1183023 +Ref: Basic High Level-Footnote-11186252 +Node: Basic Data Typing1186437 +Node: Glossary1189765 +Node: Copying1221694 +Node: GNU Free Documentation License1259250 +Node: Index1284386  End Tag Table -- cgit v1.2.3 From 547b160b254cc6501578c69ea38228ca2d829c49 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 25 Jan 2015 22:20:30 +0200 Subject: More O'Reilly edits. --- doc/gawk.info | 1084 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 542 insertions(+), 542 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index a6b8fac0..e32e2511 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -7266,9 +7266,9 @@ value to a variable or a field by using an assignment operator. An expression can serve as a pattern or action statement on its own. Most other kinds of statements contain one or more expressions that specify the data on which to operate. As in other languages, -expressions in `awk' include variables, array references, constants, -and function calls, as well as combinations of these with various -operators. +expressions in `awk' can include variables, array references, +constants, and function calls, as well as combinations of these with +various operators. * Menu: @@ -7287,8 +7287,8 @@ File: gawk.info, Node: Values, Next: All Operators, Up: Expressions ========================================= Expressions are built up from values and the operations performed upon -them. This minor node describes the elementary objects which provide -the values used in expressions. +them. This minor node describes the elementary objects that provide the +values used in expressions. * Menu: @@ -7333,14 +7333,14 @@ the same value: 1.05e+2 1050e-1 - A string constant consists of a sequence of characters enclosed in + A "string constant" consists of a sequence of characters enclosed in double quotation marks. For example: "parrot" represents the string whose contents are `parrot'. Strings in `gawk' can be of any length, and they can contain any of the possible -eight-bit ASCII characters including ASCII NUL (character code zero). +eight-bit ASCII characters, including ASCII NUL (character code zero). Other `awk' implementations may have difficulty with some character codes. @@ -7360,14 +7360,14 @@ File: gawk.info, Node: Nondecimal-numbers, Next: Regexp Constants, Prev: Scal In `awk', all numbers are in decimal (i.e., base 10). Many other programming languages allow you to specify numbers in other bases, often octal (base 8) and hexadecimal (base 16). In octal, the numbers go 0, -1, 2, 3, 4, 5, 6, 7, 10, 11, 12, and so on. Just as `11', in decimal, -is 1 times 10 plus 1, so `11', in octal, is 1 times 8, plus 1. This -equals 9 in decimal. In hexadecimal, there are 16 digits. Because the -everyday decimal number system only has ten digits (`0'-`9'), the -letters `a' through `f' are used to represent the rest. (Case in the -letters is usually irrelevant; hexadecimal `a' and `A' have the same -value.) Thus, `11', in hexadecimal, is 1 times 16 plus 1, which equals -17 in decimal. +1, 2, 3, 4, 5, 6, 7, 10, 11, 12, and so on. Just as `11' in decimal is +1 times 10 plus 1, so `11' in octal is 1 times 8 plus 1. This equals 9 +in decimal. In hexadecimal, there are 16 digits. Because the everyday +decimal number system only has ten digits (`0'-`9'), the letters `a' +through `f' are used to represent the rest. (Case in the letters is +usually irrelevant; hexadecimal `a' and `A' have the same value.) +Thus, `11' in hexadecimal is 1 times 16 plus 1, which equals 17 in +decimal. Just by looking at plain `11', you can't tell what base it's in. So, in C, C++, and other languages derived from C, there is a special @@ -7375,13 +7375,13 @@ notation to signify the base. Octal numbers start with a leading `0', and hexadecimal numbers start with a leading `0x' or `0X': `11' - Decimal value 11. + Decimal value 11 `011' - Octal 11, decimal value 9. + Octal 11, decimal value 9 `0x11' - Hexadecimal 11, decimal value 17. + Hexadecimal 11, decimal value 17 This example shows the difference: @@ -7400,11 +7400,11 @@ really need to do this, use the `--non-decimal-data' command-line option; *note Nondecimal Data::.) If you have octal or hexadecimal data, you can use the `strtonum()' function (*note String Functions::) to convert the data into a number. Most of the time, you will want to -use octal or hexadecimal constants when working with the built-in bit -manipulation functions; see *note Bitwise Functions::, for more +use octal or hexadecimal constants when working with the built-in +bit-manipulation functions; see *note Bitwise Functions::, for more information. - Unlike some early C implementations, `8' and `9' are not valid in + Unlike in some early C implementations, `8' and `9' are not valid in octal constants. For example, `gawk' treats `018' as decimal 18: $ gawk 'BEGIN { print "021 is", 021 ; print 018 }' @@ -7431,12 +7431,12 @@ File: gawk.info, Node: Regexp Constants, Prev: Nondecimal-numbers, Up: Consta 6.1.1.3 Regular Expression Constants .................................... -A regexp constant is a regular expression description enclosed in +A "regexp constant" is a regular expression description enclosed in slashes, such as `/^beginning and end$/'. Most regexps used in `awk' programs are constant, but the `~' and `!~' matching operators can also match computed or dynamic regexps (which are typically just ordinary -strings or variables that contain a regexp, but could be a more complex -expression). +strings or variables that contain a regexp, but could be more complex +expressions).  File: gawk.info, Node: Using Constant Regexps, Next: Variables, Prev: Constants, Up: Values @@ -7488,7 +7488,7 @@ and `patsplit()' functions (*note String Functions::). Modern implementations of `awk', including `gawk', allow the third argument of `split()' to be a regexp constant, but some older implementations do not. (d.c.) Because some built-in functions accept regexp constants -as arguments, it can be confusing when attempting to use regexp +as arguments, confusion can arise when attempting to use regexp constants as arguments to user-defined functions (*note User-defined::). For example: @@ -7511,10 +7511,11 @@ User-defined::). For example: In this example, the programmer wants to pass a regexp constant to the user-defined function `mysub()', which in turn passes it on to either `sub()' or `gsub()'. However, what really happens is that the -`pat' parameter is either one or zero, depending upon whether or not -`$0' matches `/hi/'. `gawk' issues a warning when it sees a regexp -constant used as a parameter to a user-defined function, because -passing a truth value in this way is probably not what was intended. +`pat' parameter is assigned a value of either one or zero, depending +upon whether or not `$0' matches `/hi/'. `gawk' issues a warning when +it sees a regexp constant used as a parameter to a user-defined +function, because passing a truth value in this way is probably not +what was intended.  File: gawk.info, Node: Variables, Next: Conversion, Prev: Using Constant Regexps, Up: Values @@ -7522,7 +7523,7 @@ File: gawk.info, Node: Variables, Next: Conversion, Prev: Using Constant Rege 6.1.3 Variables --------------- -Variables are ways of storing values at one point in your program for +"Variables" are ways of storing values at one point in your program for use later in another part of your program. They can be manipulated entirely within the program text, and they can also be assigned values on the `awk' command line. @@ -7551,14 +7552,14 @@ variables. A variable name is a valid expression by itself; it represents the variable's current value. Variables are given new values with -"assignment operators", "increment operators", and "decrement -operators". *Note Assignment Ops::. In addition, the `sub()' and -`gsub()' functions can change a variable's value, and the `match()', -`split()', and `patsplit()' functions can change the contents of their -array parameters. *Note String Functions::. +"assignment operators", "increment operators", and "decrement operators" +(*note Assignment Ops::). In addition, the `sub()' and `gsub()' +functions can change a variable's value, and the `match()', `split()', +and `patsplit()' functions can change the contents of their array +parameters (*note String Functions::). A few variables have special built-in meanings, such as `FS' (the -field separator), and `NF' (the number of fields in the current input +field separator) and `NF' (the number of fields in the current input record). *Note Built-in Variables::, for a list of the predefined variables. These predefined variables can be used and assigned just like all other variables, but their values are also used or changed @@ -7755,7 +7756,7 @@ point, so the default behavior was restored to use a period as the decimal point character. You can use the `--use-lc-numeric' option (*note Options::) to force `gawk' to use the locale's decimal point character. (`gawk' also uses the locale's decimal point character when -in POSIX mode, either via `--posix', or the `POSIXLY_CORRECT' +in POSIX mode, either via `--posix' or the `POSIXLY_CORRECT' environment variable, as shown previously.) *note table-locale-affects:: describes the cases in which the @@ -7771,10 +7772,10 @@ Input Use period Use locale Table 6.1: Locale decimal point versus a period - Finally, modern day formal standards and IEEE standard floating-point -representation can have an unusual but important effect on the way -`gawk' converts some special string values to numbers. The details are -presented in *note POSIX Floating Point Problems::. + Finally, modern-day formal standards and the IEEE standard +floating-point representation can have an unusual but important effect +on the way `gawk' converts some special string values to numbers. The +details are presented in *note POSIX Floating Point Problems::.  File: gawk.info, Node: All Operators, Next: Truth Values and Conditions, Prev: Values, Up: Expressions @@ -7782,7 +7783,7 @@ File: gawk.info, Node: All Operators, Next: Truth Values and Conditions, Prev 6.2 Operators: Doing Something with Values ========================================== -This minor node introduces the "operators" which make use of the values +This minor node introduces the "operators" that make use of the values provided by constants and variables. * Menu: @@ -7963,7 +7964,7 @@ you'll get. ---------- Footnotes ---------- - (1) It happens that BWK `awk', `gawk' and `mawk' all "get it right," + (1) It happens that BWK `awk', `gawk', and `mawk' all "get it right," but you should not rely on this.  @@ -8080,7 +8081,7 @@ righthand expression. For example: The indices of `bar' are practically guaranteed to be different, because `rand()' returns different values each time it is called. (Arrays and the `rand()' function haven't been covered yet. *Note Arrays::, and -*note Numeric Functions::, for more information). This example +*note Numeric Functions::, for more information.) This example illustrates an important fact about assignment operators: the lefthand expression is only evaluated _once_. @@ -8098,14 +8099,14 @@ converted to a number. Operator Effect -------------------------------------------------------------------------- -LVALUE `+=' INCREMENT Add INCREMENT to the value of LVALUE -LVALUE `-=' DECREMENT Subtract DECREMENT from the value of LVALUE -LVALUE `*=' Multiply the value of LVALUE by COEFFICIENT +LVALUE `+=' INCREMENT Add INCREMENT to the value of LVALUE. +LVALUE `-=' DECREMENT Subtract DECREMENT from the value of LVALUE. +LVALUE `*=' Multiply the value of LVALUE by COEFFICIENT. COEFFICIENT -LVALUE `/=' DIVISOR Divide the value of LVALUE by DIVISOR -LVALUE `%=' MODULUS Set LVALUE to its remainder by MODULUS -LVALUE `^=' POWER -LVALUE `**=' POWER Raise LVALUE to the power POWER (c.e.) +LVALUE `/=' DIVISOR Divide the value of LVALUE by DIVISOR. +LVALUE `%=' MODULUS Set LVALUE to its remainder by MODULUS. +LVALUE `^=' POWER Raise LVALUE to the power POWER. +LVALUE `**=' POWER Raise LVALUE to the power POWER. (c.e.) Table 6.2: Arithmetic assignment operators @@ -8190,8 +8191,8 @@ is a summary of increment and decrement expressions: Operator Evaluation Order - Doctor, doctor! It hurts when I do this! - So don't do that! -- Groucho Marx + Doctor, it hurts when I do this! + Then don't do that! -- Groucho Marx What happens for something like the following? @@ -8206,7 +8207,7 @@ Or something even stranger? In other words, when do the various side effects prescribed by the postfix operators (`b++') take effect? When side effects happen is -"implementation defined". In other words, it is up to the particular +"implementation-defined". In other words, it is up to the particular version of `awk'. The result for the first example may be 12 or 13, and for the second, it may be 22 or 23. @@ -8221,7 +8222,7 @@ File: gawk.info, Node: Truth Values and Conditions, Next: Function Calls, Pre =============================== In certain contexts, expression values also serve as "truth values"; -(i.e., they determine what should happen next as the program runs). This +i.e., they determine what should happen next as the program runs. This minor node describes how `awk' defines "true" and "false" and how values are compared. @@ -8275,10 +8276,10 @@ File: gawk.info, Node: Typing and Comparison, Next: Boolean Ops, Prev: Truth The Guide is definitive. Reality is frequently inaccurate. -- Douglas Adams, `The Hitchhiker's Guide to the Galaxy' - Unlike other programming languages, `awk' variables do not have a -fixed type. Instead, they can be either a number or a string, depending -upon the value that is assigned to them. We look now at how variables -are typed, and how `awk' compares variables. + Unlike in other programming languages, in `awk' variables do not +have a fixed type. Instead, they can be either a number or a string, +depending upon the value that is assigned to them. We look now at how +variables are typed, and how `awk' compares variables. * Menu: @@ -8299,16 +8300,16 @@ of the variable is important because the types of two variables determine how they are compared. Variable typing follows these rules: * A numeric constant or the result of a numeric operation has the - NUMERIC attribute. + "numeric" attribute. * A string constant or the result of a string operation has the - STRING attribute. + "string" attribute. * Fields, `getline' input, `FILENAME', `ARGV' elements, `ENVIRON' elements, and the elements of an array created by `match()', `split()', and `patsplit()' that are numeric strings have the - STRNUM attribute. Otherwise, they have the STRING attribute. - Uninitialized variables also have the STRNUM attribute. + "strnum" attribute. Otherwise, they have the "string" attribute. + Uninitialized variables also have the "strnum" attribute. * Attributes propagate across assignments but are not changed by any use. @@ -8350,12 +8351,13 @@ constant, then a string comparison is performed. Otherwise, a numeric comparison is performed. This point bears additional emphasis: All user input is made of -characters, and so is first and foremost of STRING type; input strings -that look numeric are additionally given the STRNUM attribute. Thus, -the six-character input string ` +3.14' receives the STRNUM attribute. +characters, and so is first and foremost of string type; input strings +that look numeric are additionally given the strnum attribute. Thus, +the six-character input string ` +3.14' receives the strnum attribute. In contrast, the eight characters `" +3.14"' appearing in program text comprise a string constant. The following examples print `1' when the -comparison between the two different constants is true, `0' otherwise: +comparison between the two different constants is true, and `0' +otherwise: $ echo ' +3.14' | awk '{ print($0 == " +3.14") }' True -| 1 @@ -8454,7 +8456,7 @@ comparison is: -| false the result is `false' because both `$1' and `$2' are user input. They -are numeric strings--therefore both have the STRNUM attribute, +are numeric strings--therefore both have the strnum attribute, dictating a numeric comparison. The purpose of the comparison rules and the use of numeric strings is to attempt to produce the behavior that is "least surprising," while still "doing the right thing." @@ -8513,7 +8515,7 @@ is an example to illustrate the difference, in an `en_US.UTF-8' locale: ---------- Footnotes ---------- (1) Technically, string comparison is supposed to behave the same -way as if the strings are compared with the C `strcoll()' function. +way as if the strings were compared with the C `strcoll()' function.  File: gawk.info, Node: Boolean Ops, Next: Conditional Exp, Prev: Typing and Comparison, Up: Truth Values and Conditions @@ -8576,7 +8578,7 @@ Boolean operators are: The `&&' and `||' operators are called "short-circuit" operators because of the way they work. Evaluation of the full expression is -"short-circuited" if the result can be determined part way through its +"short-circuited" if the result can be determined partway through its evaluation. Statements that end with `&&' or `||' can be continued simply by @@ -8629,15 +8631,15 @@ File: gawk.info, Node: Conditional Exp, Prev: Boolean Ops, Up: Truth Values a A "conditional expression" is a special kind of expression that has three operands. It allows you to use one expression's value to select -one of two other expressions. The conditional expression is the same -as in the C language, as shown here: +one of two other expressions. The conditional expression in `awk' is +the same as in the C language, as shown here: SELECTOR ? IF-TRUE-EXP : IF-FALSE-EXP There are three subexpressions. The first, SELECTOR, is always computed first. If it is "true" (not zero or not null), then -IF-TRUE-EXP is computed next and its value becomes the value of the -whole expression. Otherwise, IF-FALSE-EXP is computed next and its +IF-TRUE-EXP is computed next, and its value becomes the value of the +whole expression. Otherwise, IF-FALSE-EXP is computed next, and its value becomes the value of the whole expression. For example, the following expression produces the absolute value of `x': @@ -8671,7 +8673,7 @@ A "function" is a name for a particular calculation. This enables you to ask for it by name at any point in the program. For example, the function `sqrt()' computes the square root of a number. - A fixed set of functions are "built-in", which means they are + A fixed set of functions are "built in", which means they are available in every `awk' program. The `sqrt()' function is one of these. *Note Built-in::, for a list of built-in functions and their descriptions. In addition, you can define functions for use in your @@ -8806,7 +8808,7 @@ precedence: Increment, decrement. `^ **' - Exponentiation. These operators group right-to-left. + Exponentiation. These operators group right to left. `+ - !' Unary plus, minus, logical "not." @@ -8833,7 +8835,7 @@ String concatenation operand of another operator. As a result, it does not make sense to use a redirection operator near another operator of lower precedence without parentheses. Such combinations (e.g., `print - foo > a ? b : c'), result in syntax errors. The correct way to + foo > a ? b : c') result in syntax errors. The correct way to write this statement is `print foo > (a ? b : c)'. `~ !~' @@ -8843,16 +8845,16 @@ String concatenation Array membership. `&&' - Logical "and". + Logical "and." `||' - Logical "or". + Logical "or." `?:' - Conditional. This operator groups right-to-left. + Conditional. This operator groups right to left. `= += -= *= /= %= ^= **=' - Assignment. These operators group right-to-left. + Assignment. These operators group right to left. NOTE: The `|&', `**', and `**=' operators are not specified by POSIX. For maximum portability, do not use them. @@ -8920,24 +8922,24 @@ File: gawk.info, Node: Expressions Summary, Prev: Locales, Up: Expressions * `awk' provides the usual arithmetic operators (addition, subtraction, multiplication, division, modulus), and unary plus - and minus. It also provides comparison operators, boolean - operators, array membership testing, and regexp matching - operators. String concatenation is accomplished by placing two - expressions next to each other; there is no explicit operator. - The three-operand `?:' operator provides an "if-else" test within - expressions. + and minus. It also provides comparison operators, Boolean + operators, an array membership testing operator, and regexp + matching operators. String concatenation is accomplished by + placing two expressions next to each other; there is no explicit + operator. The three-operand `?:' operator provides an "if-else" + test within expressions. * Assignment operators provide convenient shorthands for common arithmetic operations. - * In `awk', a value is considered to be true if it is non-zero _or_ + * In `awk', a value is considered to be true if it is nonzero _or_ non-null. Otherwise, the value is false. * A variable's type is set upon each assignment and may change over its lifetime. The type determines how it behaves in comparisons (string or numeric). - * Function calls return a value which may be used as part of a larger + * Function calls return a value that may be used as part of a larger expression. Expressions used to pass parameter values are fully evaluated before the function is called. `awk' provides built-in and user-defined functions; this is described in *note Functions::. @@ -9111,7 +9113,7 @@ inside Boolean patterns. Likewise, the special patterns `BEGIN', `END', `BEGINFILE', and `ENDFILE', which never match any input record, are not expressions and cannot appear inside Boolean patterns. - The precedence of the different operators which can appear in + The precedence of the different operators that can appear in patterns is described in *note Precedence::.  @@ -9131,8 +9133,8 @@ following: prints every record in `myfile' between `on'/`off' pairs, inclusive. A range pattern starts out by matching BEGPAT against every input -record. When a record matches BEGPAT, the range pattern is "turned on" -and the range pattern matches this record as well. As long as the +record. When a record matches BEGPAT, the range pattern is "turned +on", and the range pattern matches this record as well. As long as the range pattern stays turned on, it automatically matches every input record read. The range pattern also matches ENDPAT against every input record; when this succeeds, the range pattern is "turned off" again for @@ -9250,7 +9252,7 @@ for more information on using library functions. *Note Library Functions::, for a number of useful library functions. If an `awk' program has only `BEGIN' rules and no other rules, then -the program exits after the `BEGIN' rule is run.(1) However, if an +the program exits after the `BEGIN' rules are run.(1) However, if an `END' rule exists, then the input is read, even if there are no other rules in the program. This is necessary in case the `END' rule checks the `FNR' and `NR' variables. @@ -9276,7 +9278,7 @@ give `$0' a real value is to execute a `getline' command without a variable (*note Getline::). Another way is simply to assign a value to `$0'. - The second point is similar to the first but from the other + The second point is similar to the first, but from the other direction. Traditionally, due largely to implementation issues, `$0' and `NF' were _undefined_ inside an `END' rule. The POSIX standard specifies that `NF' is available in an `END' rule. It contains the @@ -9337,7 +9339,7 @@ tasks that would otherwise be difficult or impossible to perform: entirely. Otherwise, `gawk' exits with the usual fatal error. * If you have written extensions that modify the record handling (by - inserting an "input parser," *note Input Parsers::), you can invoke + inserting an "input parser"; *note Input Parsers::), you can invoke them at this point, before `gawk' has started processing the file. (This is a _very_ advanced feature, currently used only by the `gawkextlib' project (http://gawkextlib.sourceforge.net).) @@ -9347,16 +9349,15 @@ last record in an input file. For the last input file, it will be called before any `END' rules. The `ENDFILE' rule is executed even for empty input files. - Normally, when an error occurs when reading input in the normal input -processing loop, the error is fatal. However, if an `ENDFILE' rule is -present, the error becomes non-fatal, and instead `ERRNO' is set. This -makes it possible to catch and process I/O errors at the level of the -`awk' program. + Normally, when an error occurs when reading input in the normal +input-processing loop, the error is fatal. However, if an `ENDFILE' +rule is present, the error becomes non-fatal, and instead `ERRNO' is +set. This makes it possible to catch and process I/O errors at the +level of the `awk' program. The `next' statement (*note Next Statement::) is not allowed inside either a `BEGINFILE' or an `ENDFILE' rule. The `nextfile' statement is -allowed only inside a `BEGINFILE' rule, but not inside an `ENDFILE' -rule. +allowed only inside a `BEGINFILE' rule, not inside an `ENDFILE' rule. The `getline' statement (*note Getline::) is restricted inside both `BEGINFILE' and `ENDFILE': only redirected forms of `getline' are @@ -9401,11 +9402,11 @@ following program: END { print nmatches, "found" }' /path/to/data The `awk' program consists of two pieces of quoted text that are -concatenated together to form the program. The first part is double -quoted, which allows substitution of the `pattern' shell variable -inside the quotes. The second part is single quoted. +concatenated together to form the program. The first part is +double-quoted, which allows substitution of the `pattern' shell +variable inside the quotes. The second part is single-quoted. - Variable substitution via quoting works, but can be potentially + Variable substitution via quoting works, but can potentially be messy. It requires a good understanding of the shell's quoting rules (*note Quoting::), and it's often difficult to correctly match up the quotes when reading the program. @@ -9602,15 +9603,15 @@ The body of this loop is a compound statement enclosed in braces, containing two statements. The loop works in the following manner: first, the value of `i' is set to one. Then, the `while' statement tests whether `i' is less than or equal to three. This is true when -`i' equals one, so the `i'-th field is printed. Then the `i++' +`i' equals one, so the `i'th field is printed. Then the `i++' increments the value of `i' and the loop repeats. The loop terminates when `i' reaches four. A newline is not required between the condition and the body; however, using one makes the program clearer unless the body is a -compound statement or else is very simple. The newline after the -open-brace that begins the compound statement is not required either, -but the program is harder to read without it. +compound statement or else is very simple. The newline after the open +brace that begins the compound statement is not required either, but the +program is harder to read without it.  File: gawk.info, Node: Do Statement, Next: For Statement, Prev: While Statement, Up: Statements @@ -9633,7 +9634,7 @@ Contrast this with the corresponding `while' statement: while (CONDITION) BODY -This statement does not execute BODY even once if the CONDITION is +This statement does not execute the BODY even once if the CONDITION is false to begin with. The following is an example of a `do' statement: { @@ -9689,7 +9690,7 @@ loop.) The same is true of the INCREMENT part. Incrementing additional variables requires separate statements at the end of the loop. The C compound expression, using C's comma operator, is useful in this -context but it is not supported in `awk'. +context, but it is not supported in `awk'. Most often, INCREMENT is an increment expression, as in the previous example. But this is not required; it can be any expression @@ -9765,7 +9766,7 @@ statement looks like this: Control flow in the `switch' statement works as it does in C. Once a match to a given case is made, the case statement bodies execute until -a `break', `continue', `next', `nextfile' or `exit' is encountered, or +a `break', `continue', `next', `nextfile', or `exit' is encountered, or the end of the `switch' statement itself. For example: while ((c = getopt(ARGC, ARGV, "aksx")) != -1) { @@ -10008,12 +10009,11 @@ listed in `ARGV'. standard. See the Austin Group website (http://austingroupbugs.net/view.php?id=607). - The current version of BWK `awk', and `mawk' also support -`nextfile'. However, they don't allow the `nextfile' statement inside -function bodies (*note User-defined::). `gawk' does; a `nextfile' -inside a function body reads the next record and starts processing it -with the first rule in the program, just as any other `nextfile' -statement. + The current version of BWK `awk' and `mawk' also support `nextfile'. +However, they don't allow the `nextfile' statement inside function +bodies (*note User-defined::). `gawk' does; a `nextfile' inside a +function body reads the next record and starts processing it with the +first rule in the program, just as any other `nextfile' statement.  File: gawk.info, Node: Exit Statement, Prev: Nextfile Statement, Up: Statements @@ -10041,9 +10041,9 @@ record, skips reading any remaining input records, and executes the they do not execute. In such a case, if you don't want the `END' rule to do its job, set -a variable to nonzero before the `exit' statement and check that -variable in the `END' rule. *Note Assert Function::, for an example -that does this. +a variable to a nonzero value before the `exit' statement and check +that variable in the `END' rule. *Note Assert Function::, for an +example that does this. If an argument is supplied to `exit', its value is used as the exit status code for the `awk' process. If no argument is supplied, `exit' @@ -10101,7 +10101,7 @@ of activity.  File: gawk.info, Node: User-modified, Next: Auto-set, Up: Built-in Variables -7.5.1 Built-In Variables That Control `awk' +7.5.1 Built-in Variables That Control `awk' ------------------------------------------- The following is an alphabetical list of variables that you can change @@ -33018,7 +33018,7 @@ Index * getline from a file: Getline/File. (line 6) * getline into a variable: Getline/Variable. (line 6) * getline statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE. - (line 54) + (line 53) * getlocaltime() user-defined function: Getlocaltime Function. (line 16) * getopt() function (C library): Getopt Function. (line 15) @@ -34586,423 +34586,423 @@ Ref: Close Files And Pipes-Footnote-2315212 Node: Output Summary315362 Node: Output Exercises316360 Node: Expressions317040 -Node: Values318225 -Node: Constants318903 -Node: Scalar Constants319594 -Ref: Scalar Constants-Footnote-1320453 -Node: Nondecimal-numbers320703 -Node: Regexp Constants323721 -Node: Using Constant Regexps324246 -Node: Variables327389 -Node: Using Variables328044 -Node: Assignment Options329955 -Node: Conversion331830 -Node: Strings And Numbers332354 -Ref: Strings And Numbers-Footnote-1335419 -Node: Locale influences conversions335528 -Ref: table-locale-affects338275 -Node: All Operators338863 -Node: Arithmetic Ops339493 -Node: Concatenation341998 -Ref: Concatenation-Footnote-1344817 -Node: Assignment Ops344923 -Ref: table-assign-ops349902 -Node: Increment Ops351174 -Node: Truth Values and Conditions354612 -Node: Truth Values355697 -Node: Typing and Comparison356746 -Node: Variable Typing357556 -Node: Comparison Operators361209 -Ref: table-relational-ops361619 -Node: POSIX String Comparison365114 -Ref: POSIX String Comparison-Footnote-1366186 -Node: Boolean Ops366324 -Ref: Boolean Ops-Footnote-1370803 -Node: Conditional Exp370894 -Node: Function Calls372621 -Node: Precedence376501 -Node: Locales380162 -Node: Expressions Summary381794 -Node: Patterns and Actions384354 -Node: Pattern Overview385474 -Node: Regexp Patterns387153 -Node: Expression Patterns387696 -Node: Ranges391406 -Node: BEGIN/END394512 -Node: Using BEGIN/END395273 -Ref: Using BEGIN/END-Footnote-1398007 -Node: I/O And BEGIN/END398113 -Node: BEGINFILE/ENDFILE400427 -Node: Empty403328 -Node: Using Shell Variables403645 -Node: Action Overview405918 -Node: Statements408244 -Node: If Statement410092 -Node: While Statement411587 -Node: Do Statement413616 -Node: For Statement414760 -Node: Switch Statement417917 -Node: Break Statement420299 -Node: Continue Statement422340 -Node: Next Statement424167 -Node: Nextfile Statement426548 -Node: Exit Statement429178 -Node: Built-in Variables431581 -Node: User-modified432714 -Ref: User-modified-Footnote-1440395 -Node: Auto-set440457 -Ref: Auto-set-Footnote-1453492 -Ref: Auto-set-Footnote-2453697 -Node: ARGC and ARGV453753 -Node: Pattern Action Summary457971 -Node: Arrays460398 -Node: Array Basics461727 -Node: Array Intro462571 -Ref: figure-array-elements464535 -Ref: Array Intro-Footnote-1467061 -Node: Reference to Elements467189 -Node: Assigning Elements469641 -Node: Array Example470132 -Node: Scanning an Array471890 -Node: Controlling Scanning474906 -Ref: Controlling Scanning-Footnote-1480102 -Node: Numeric Array Subscripts480418 -Node: Uninitialized Subscripts482603 -Node: Delete484220 -Ref: Delete-Footnote-1486963 -Node: Multidimensional487020 -Node: Multiscanning490117 -Node: Arrays of Arrays491706 -Node: Arrays Summary496465 -Node: Functions498557 -Node: Built-in499456 -Node: Calling Built-in500534 -Node: Numeric Functions502525 -Ref: Numeric Functions-Footnote-1506542 -Ref: Numeric Functions-Footnote-2506899 -Ref: Numeric Functions-Footnote-3506947 -Node: String Functions507219 -Ref: String Functions-Footnote-1530694 -Ref: String Functions-Footnote-2530823 -Ref: String Functions-Footnote-3531071 -Node: Gory Details531158 -Ref: table-sub-escapes532939 -Ref: table-sub-proposed534459 -Ref: table-posix-sub535823 -Ref: table-gensub-escapes537359 -Ref: Gory Details-Footnote-1538191 -Node: I/O Functions538342 -Ref: I/O Functions-Footnote-1545560 -Node: Time Functions545707 -Ref: Time Functions-Footnote-1556195 -Ref: Time Functions-Footnote-2556263 -Ref: Time Functions-Footnote-3556421 -Ref: Time Functions-Footnote-4556532 -Ref: Time Functions-Footnote-5556644 -Ref: Time Functions-Footnote-6556871 -Node: Bitwise Functions557137 -Ref: table-bitwise-ops557699 -Ref: Bitwise Functions-Footnote-1562008 -Node: Type Functions562177 -Node: I18N Functions563328 -Node: User-defined564973 -Node: Definition Syntax565778 -Ref: Definition Syntax-Footnote-1571185 -Node: Function Example571256 -Ref: Function Example-Footnote-1574175 -Node: Function Caveats574197 -Node: Calling A Function574715 -Node: Variable Scope575673 -Node: Pass By Value/Reference578661 -Node: Return Statement582156 -Node: Dynamic Typing585137 -Node: Indirect Calls586066 -Ref: Indirect Calls-Footnote-1597368 -Node: Functions Summary597496 -Node: Library Functions600198 -Ref: Library Functions-Footnote-1603807 -Ref: Library Functions-Footnote-2603950 -Node: Library Names604121 -Ref: Library Names-Footnote-1607575 -Ref: Library Names-Footnote-2607798 -Node: General Functions607884 -Node: Strtonum Function608987 -Node: Assert Function612009 -Node: Round Function615333 -Node: Cliff Random Function616874 -Node: Ordinal Functions617890 -Ref: Ordinal Functions-Footnote-1620953 -Ref: Ordinal Functions-Footnote-2621205 -Node: Join Function621416 -Ref: Join Function-Footnote-1623185 -Node: Getlocaltime Function623385 -Node: Readfile Function627129 -Node: Shell Quoting629099 -Node: Data File Management630500 -Node: Filetrans Function631132 -Node: Rewind Function635188 -Node: File Checking636575 -Ref: File Checking-Footnote-1637907 -Node: Empty Files638108 -Node: Ignoring Assigns640087 -Node: Getopt Function641638 -Ref: Getopt Function-Footnote-1653100 -Node: Passwd Functions653300 -Ref: Passwd Functions-Footnote-1662137 -Node: Group Functions662225 -Ref: Group Functions-Footnote-1670119 -Node: Walking Arrays670332 -Node: Library Functions Summary671935 -Node: Library Exercises673336 -Node: Sample Programs674616 -Node: Running Examples675386 -Node: Clones676114 -Node: Cut Program677338 -Node: Egrep Program687057 -Ref: Egrep Program-Footnote-1694555 -Node: Id Program694665 -Node: Split Program698310 -Ref: Split Program-Footnote-1701758 -Node: Tee Program701886 -Node: Uniq Program704675 -Node: Wc Program712094 -Ref: Wc Program-Footnote-1716344 -Node: Miscellaneous Programs716438 -Node: Dupword Program717651 -Node: Alarm Program719682 -Node: Translate Program724486 -Ref: Translate Program-Footnote-1729051 -Node: Labels Program729321 -Ref: Labels Program-Footnote-1732672 -Node: Word Sorting732756 -Node: History Sorting736827 -Node: Extract Program738663 -Node: Simple Sed746188 -Node: Igawk Program749256 -Ref: Igawk Program-Footnote-1763580 -Ref: Igawk Program-Footnote-2763781 -Ref: Igawk Program-Footnote-3763903 -Node: Anagram Program764018 -Node: Signature Program767075 -Node: Programs Summary768322 -Node: Programs Exercises769515 -Ref: Programs Exercises-Footnote-1773646 -Node: Advanced Features773737 -Node: Nondecimal Data775685 -Node: Array Sorting777275 -Node: Controlling Array Traversal777972 -Ref: Controlling Array Traversal-Footnote-1786305 -Node: Array Sorting Functions786423 -Ref: Array Sorting Functions-Footnote-1790312 -Node: Two-way I/O790508 -Ref: Two-way I/O-Footnote-1795453 -Ref: Two-way I/O-Footnote-2795639 -Node: TCP/IP Networking795721 -Node: Profiling798594 -Node: Advanced Features Summary806141 -Node: Internationalization808074 -Node: I18N and L10N809554 -Node: Explaining gettext810240 -Ref: Explaining gettext-Footnote-1815265 -Ref: Explaining gettext-Footnote-2815449 -Node: Programmer i18n815614 -Ref: Programmer i18n-Footnote-1820480 -Node: Translator i18n820529 -Node: String Extraction821323 -Ref: String Extraction-Footnote-1822454 -Node: Printf Ordering822540 -Ref: Printf Ordering-Footnote-1825326 -Node: I18N Portability825390 -Ref: I18N Portability-Footnote-1827845 -Node: I18N Example827908 -Ref: I18N Example-Footnote-1830711 -Node: Gawk I18N830783 -Node: I18N Summary831421 -Node: Debugger832760 -Node: Debugging833782 -Node: Debugging Concepts834223 -Node: Debugging Terms836076 -Node: Awk Debugging838648 -Node: Sample Debugging Session839542 -Node: Debugger Invocation840062 -Node: Finding The Bug841446 -Node: List of Debugger Commands847921 -Node: Breakpoint Control849254 -Node: Debugger Execution Control852950 -Node: Viewing And Changing Data856314 -Node: Execution Stack859692 -Node: Debugger Info861329 -Node: Miscellaneous Debugger Commands865346 -Node: Readline Support870375 -Node: Limitations871267 -Node: Debugging Summary873381 -Node: Arbitrary Precision Arithmetic874549 -Node: Computer Arithmetic875965 -Ref: table-numeric-ranges879563 -Ref: Computer Arithmetic-Footnote-1880422 -Node: Math Definitions880479 -Ref: table-ieee-formats883767 -Ref: Math Definitions-Footnote-1884371 -Node: MPFR features884476 -Node: FP Math Caution886147 -Ref: FP Math Caution-Footnote-1887197 -Node: Inexactness of computations887566 -Node: Inexact representation888525 -Node: Comparing FP Values889882 -Node: Errors accumulate890964 -Node: Getting Accuracy892397 -Node: Try To Round895059 -Node: Setting precision895958 -Ref: table-predefined-precision-strings896642 -Node: Setting the rounding mode898431 -Ref: table-gawk-rounding-modes898795 -Ref: Setting the rounding mode-Footnote-1902250 -Node: Arbitrary Precision Integers902429 -Ref: Arbitrary Precision Integers-Footnote-1905415 -Node: POSIX Floating Point Problems905564 -Ref: POSIX Floating Point Problems-Footnote-1909437 -Node: Floating point summary909475 -Node: Dynamic Extensions911669 -Node: Extension Intro913221 -Node: Plugin License914487 -Node: Extension Mechanism Outline915284 -Ref: figure-load-extension915712 -Ref: figure-register-new-function917192 -Ref: figure-call-new-function918196 -Node: Extension API Description920182 -Node: Extension API Functions Introduction921632 -Node: General Data Types926456 -Ref: General Data Types-Footnote-1932195 -Node: Memory Allocation Functions932494 -Ref: Memory Allocation Functions-Footnote-1935333 -Node: Constructor Functions935429 -Node: Registration Functions937163 -Node: Extension Functions937848 -Node: Exit Callback Functions940145 -Node: Extension Version String941393 -Node: Input Parsers942058 -Node: Output Wrappers951937 -Node: Two-way processors956452 -Node: Printing Messages958656 -Ref: Printing Messages-Footnote-1959732 -Node: Updating `ERRNO'959884 -Node: Requesting Values960624 -Ref: table-value-types-returned961352 -Node: Accessing Parameters962309 -Node: Symbol Table Access963540 -Node: Symbol table by name964054 -Node: Symbol table by cookie966035 -Ref: Symbol table by cookie-Footnote-1970179 -Node: Cached values970242 -Ref: Cached values-Footnote-1973741 -Node: Array Manipulation973832 -Ref: Array Manipulation-Footnote-1974930 -Node: Array Data Types974967 -Ref: Array Data Types-Footnote-1977622 -Node: Array Functions977714 -Node: Flattening Arrays981568 -Node: Creating Arrays988460 -Node: Extension API Variables993231 -Node: Extension Versioning993867 -Node: Extension API Informational Variables995768 -Node: Extension API Boilerplate996833 -Node: Finding Extensions1000642 -Node: Extension Example1001202 -Node: Internal File Description1001974 -Node: Internal File Ops1006041 -Ref: Internal File Ops-Footnote-11017711 -Node: Using Internal File Ops1017851 -Ref: Using Internal File Ops-Footnote-11020234 -Node: Extension Samples1020507 -Node: Extension Sample File Functions1022033 -Node: Extension Sample Fnmatch1029671 -Node: Extension Sample Fork1031162 -Node: Extension Sample Inplace1032377 -Node: Extension Sample Ord1034052 -Node: Extension Sample Readdir1034888 -Ref: table-readdir-file-types1035764 -Node: Extension Sample Revout1036575 -Node: Extension Sample Rev2way1037165 -Node: Extension Sample Read write array1037905 -Node: Extension Sample Readfile1039845 -Node: Extension Sample Time1040940 -Node: Extension Sample API Tests1042289 -Node: gawkextlib1042780 -Node: Extension summary1045438 -Node: Extension Exercises1049127 -Node: Language History1049849 -Node: V7/SVR3.11051505 -Node: SVR41053686 -Node: POSIX1055131 -Node: BTL1056520 -Node: POSIX/GNU1057254 -Node: Feature History1062818 -Node: Common Extensions1075916 -Node: Ranges and Locales1077240 -Ref: Ranges and Locales-Footnote-11081858 -Ref: Ranges and Locales-Footnote-21081885 -Ref: Ranges and Locales-Footnote-31082119 -Node: Contributors1082340 -Node: History summary1087881 -Node: Installation1089251 -Node: Gawk Distribution1090197 -Node: Getting1090681 -Node: Extracting1091504 -Node: Distribution contents1093139 -Node: Unix Installation1098856 -Node: Quick Installation1099473 -Node: Additional Configuration Options1101897 -Node: Configuration Philosophy1103635 -Node: Non-Unix Installation1106004 -Node: PC Installation1106462 -Node: PC Binary Installation1107781 -Node: PC Compiling1109629 -Ref: PC Compiling-Footnote-11112650 -Node: PC Testing1112759 -Node: PC Using1113935 -Node: Cygwin1118050 -Node: MSYS1118873 -Node: VMS Installation1119373 -Node: VMS Compilation1120165 -Ref: VMS Compilation-Footnote-11121387 -Node: VMS Dynamic Extensions1121445 -Node: VMS Installation Details1123129 -Node: VMS Running1125381 -Node: VMS GNV1128217 -Node: VMS Old Gawk1128951 -Node: Bugs1129421 -Node: Other Versions1133304 -Node: Installation summary1139728 -Node: Notes1140784 -Node: Compatibility Mode1141649 -Node: Additions1142431 -Node: Accessing The Source1143356 -Node: Adding Code1144791 -Node: New Ports1150948 -Node: Derived Files1155430 -Ref: Derived Files-Footnote-11160905 -Ref: Derived Files-Footnote-21160939 -Ref: Derived Files-Footnote-31161535 -Node: Future Extensions1161649 -Node: Implementation Limitations1162255 -Node: Extension Design1163503 -Node: Old Extension Problems1164657 -Ref: Old Extension Problems-Footnote-11166174 -Node: Extension New Mechanism Goals1166231 -Ref: Extension New Mechanism Goals-Footnote-11169591 -Node: Extension Other Design Decisions1169780 -Node: Extension Future Growth1171888 -Node: Old Extension Mechanism1172724 -Node: Notes summary1174486 -Node: Basic Concepts1175672 -Node: Basic High Level1176353 -Ref: figure-general-flow1176625 -Ref: figure-process-flow1177224 -Ref: Basic High Level-Footnote-11180453 -Node: Basic Data Typing1180638 -Node: Glossary1183966 -Node: Copying1215895 -Node: GNU Free Documentation License1253451 -Node: Index1278587 +Node: Values318229 +Node: Constants318906 +Node: Scalar Constants319597 +Ref: Scalar Constants-Footnote-1320459 +Node: Nondecimal-numbers320709 +Node: Regexp Constants323719 +Node: Using Constant Regexps324245 +Node: Variables327408 +Node: Using Variables328065 +Node: Assignment Options329976 +Node: Conversion331851 +Node: Strings And Numbers332375 +Ref: Strings And Numbers-Footnote-1335440 +Node: Locale influences conversions335549 +Ref: table-locale-affects338295 +Node: All Operators338887 +Node: Arithmetic Ops339516 +Node: Concatenation342021 +Ref: Concatenation-Footnote-1344840 +Node: Assignment Ops344947 +Ref: table-assign-ops349926 +Node: Increment Ops351236 +Node: Truth Values and Conditions354667 +Node: Truth Values355750 +Node: Typing and Comparison356799 +Node: Variable Typing357615 +Node: Comparison Operators361282 +Ref: table-relational-ops361692 +Node: POSIX String Comparison365187 +Ref: POSIX String Comparison-Footnote-1366259 +Node: Boolean Ops366398 +Ref: Boolean Ops-Footnote-1370876 +Node: Conditional Exp370967 +Node: Function Calls372705 +Node: Precedence376585 +Node: Locales380245 +Node: Expressions Summary381877 +Node: Patterns and Actions384448 +Node: Pattern Overview385568 +Node: Regexp Patterns387247 +Node: Expression Patterns387790 +Node: Ranges391499 +Node: BEGIN/END394606 +Node: Using BEGIN/END395367 +Ref: Using BEGIN/END-Footnote-1398103 +Node: I/O And BEGIN/END398209 +Node: BEGINFILE/ENDFILE400524 +Node: Empty403421 +Node: Using Shell Variables403738 +Node: Action Overview406011 +Node: Statements408337 +Node: If Statement410185 +Node: While Statement411680 +Node: Do Statement413708 +Node: For Statement414856 +Node: Switch Statement418014 +Node: Break Statement420396 +Node: Continue Statement422437 +Node: Next Statement424264 +Node: Nextfile Statement426645 +Node: Exit Statement429273 +Node: Built-in Variables431684 +Node: User-modified432817 +Ref: User-modified-Footnote-1440498 +Node: Auto-set440560 +Ref: Auto-set-Footnote-1453595 +Ref: Auto-set-Footnote-2453800 +Node: ARGC and ARGV453856 +Node: Pattern Action Summary458074 +Node: Arrays460501 +Node: Array Basics461830 +Node: Array Intro462674 +Ref: figure-array-elements464638 +Ref: Array Intro-Footnote-1467164 +Node: Reference to Elements467292 +Node: Assigning Elements469744 +Node: Array Example470235 +Node: Scanning an Array471993 +Node: Controlling Scanning475009 +Ref: Controlling Scanning-Footnote-1480205 +Node: Numeric Array Subscripts480521 +Node: Uninitialized Subscripts482706 +Node: Delete484323 +Ref: Delete-Footnote-1487066 +Node: Multidimensional487123 +Node: Multiscanning490220 +Node: Arrays of Arrays491809 +Node: Arrays Summary496568 +Node: Functions498660 +Node: Built-in499559 +Node: Calling Built-in500637 +Node: Numeric Functions502628 +Ref: Numeric Functions-Footnote-1506645 +Ref: Numeric Functions-Footnote-2507002 +Ref: Numeric Functions-Footnote-3507050 +Node: String Functions507322 +Ref: String Functions-Footnote-1530797 +Ref: String Functions-Footnote-2530926 +Ref: String Functions-Footnote-3531174 +Node: Gory Details531261 +Ref: table-sub-escapes533042 +Ref: table-sub-proposed534562 +Ref: table-posix-sub535926 +Ref: table-gensub-escapes537462 +Ref: Gory Details-Footnote-1538294 +Node: I/O Functions538445 +Ref: I/O Functions-Footnote-1545663 +Node: Time Functions545810 +Ref: Time Functions-Footnote-1556298 +Ref: Time Functions-Footnote-2556366 +Ref: Time Functions-Footnote-3556524 +Ref: Time Functions-Footnote-4556635 +Ref: Time Functions-Footnote-5556747 +Ref: Time Functions-Footnote-6556974 +Node: Bitwise Functions557240 +Ref: table-bitwise-ops557802 +Ref: Bitwise Functions-Footnote-1562111 +Node: Type Functions562280 +Node: I18N Functions563431 +Node: User-defined565076 +Node: Definition Syntax565881 +Ref: Definition Syntax-Footnote-1571288 +Node: Function Example571359 +Ref: Function Example-Footnote-1574278 +Node: Function Caveats574300 +Node: Calling A Function574818 +Node: Variable Scope575776 +Node: Pass By Value/Reference578764 +Node: Return Statement582259 +Node: Dynamic Typing585240 +Node: Indirect Calls586169 +Ref: Indirect Calls-Footnote-1597471 +Node: Functions Summary597599 +Node: Library Functions600301 +Ref: Library Functions-Footnote-1603910 +Ref: Library Functions-Footnote-2604053 +Node: Library Names604224 +Ref: Library Names-Footnote-1607678 +Ref: Library Names-Footnote-2607901 +Node: General Functions607987 +Node: Strtonum Function609090 +Node: Assert Function612112 +Node: Round Function615436 +Node: Cliff Random Function616977 +Node: Ordinal Functions617993 +Ref: Ordinal Functions-Footnote-1621056 +Ref: Ordinal Functions-Footnote-2621308 +Node: Join Function621519 +Ref: Join Function-Footnote-1623288 +Node: Getlocaltime Function623488 +Node: Readfile Function627232 +Node: Shell Quoting629202 +Node: Data File Management630603 +Node: Filetrans Function631235 +Node: Rewind Function635291 +Node: File Checking636678 +Ref: File Checking-Footnote-1638010 +Node: Empty Files638211 +Node: Ignoring Assigns640190 +Node: Getopt Function641741 +Ref: Getopt Function-Footnote-1653203 +Node: Passwd Functions653403 +Ref: Passwd Functions-Footnote-1662240 +Node: Group Functions662328 +Ref: Group Functions-Footnote-1670222 +Node: Walking Arrays670435 +Node: Library Functions Summary672038 +Node: Library Exercises673439 +Node: Sample Programs674719 +Node: Running Examples675489 +Node: Clones676217 +Node: Cut Program677441 +Node: Egrep Program687160 +Ref: Egrep Program-Footnote-1694658 +Node: Id Program694768 +Node: Split Program698413 +Ref: Split Program-Footnote-1701861 +Node: Tee Program701989 +Node: Uniq Program704778 +Node: Wc Program712197 +Ref: Wc Program-Footnote-1716447 +Node: Miscellaneous Programs716541 +Node: Dupword Program717754 +Node: Alarm Program719785 +Node: Translate Program724589 +Ref: Translate Program-Footnote-1729154 +Node: Labels Program729424 +Ref: Labels Program-Footnote-1732775 +Node: Word Sorting732859 +Node: History Sorting736930 +Node: Extract Program738766 +Node: Simple Sed746291 +Node: Igawk Program749359 +Ref: Igawk Program-Footnote-1763683 +Ref: Igawk Program-Footnote-2763884 +Ref: Igawk Program-Footnote-3764006 +Node: Anagram Program764121 +Node: Signature Program767178 +Node: Programs Summary768425 +Node: Programs Exercises769618 +Ref: Programs Exercises-Footnote-1773749 +Node: Advanced Features773840 +Node: Nondecimal Data775788 +Node: Array Sorting777378 +Node: Controlling Array Traversal778075 +Ref: Controlling Array Traversal-Footnote-1786408 +Node: Array Sorting Functions786526 +Ref: Array Sorting Functions-Footnote-1790415 +Node: Two-way I/O790611 +Ref: Two-way I/O-Footnote-1795556 +Ref: Two-way I/O-Footnote-2795742 +Node: TCP/IP Networking795824 +Node: Profiling798697 +Node: Advanced Features Summary806244 +Node: Internationalization808177 +Node: I18N and L10N809657 +Node: Explaining gettext810343 +Ref: Explaining gettext-Footnote-1815368 +Ref: Explaining gettext-Footnote-2815552 +Node: Programmer i18n815717 +Ref: Programmer i18n-Footnote-1820583 +Node: Translator i18n820632 +Node: String Extraction821426 +Ref: String Extraction-Footnote-1822557 +Node: Printf Ordering822643 +Ref: Printf Ordering-Footnote-1825429 +Node: I18N Portability825493 +Ref: I18N Portability-Footnote-1827948 +Node: I18N Example828011 +Ref: I18N Example-Footnote-1830814 +Node: Gawk I18N830886 +Node: I18N Summary831524 +Node: Debugger832863 +Node: Debugging833885 +Node: Debugging Concepts834326 +Node: Debugging Terms836179 +Node: Awk Debugging838751 +Node: Sample Debugging Session839645 +Node: Debugger Invocation840165 +Node: Finding The Bug841549 +Node: List of Debugger Commands848024 +Node: Breakpoint Control849357 +Node: Debugger Execution Control853053 +Node: Viewing And Changing Data856417 +Node: Execution Stack859795 +Node: Debugger Info861432 +Node: Miscellaneous Debugger Commands865449 +Node: Readline Support870478 +Node: Limitations871370 +Node: Debugging Summary873484 +Node: Arbitrary Precision Arithmetic874652 +Node: Computer Arithmetic876068 +Ref: table-numeric-ranges879666 +Ref: Computer Arithmetic-Footnote-1880525 +Node: Math Definitions880582 +Ref: table-ieee-formats883870 +Ref: Math Definitions-Footnote-1884474 +Node: MPFR features884579 +Node: FP Math Caution886250 +Ref: FP Math Caution-Footnote-1887300 +Node: Inexactness of computations887669 +Node: Inexact representation888628 +Node: Comparing FP Values889985 +Node: Errors accumulate891067 +Node: Getting Accuracy892500 +Node: Try To Round895162 +Node: Setting precision896061 +Ref: table-predefined-precision-strings896745 +Node: Setting the rounding mode898534 +Ref: table-gawk-rounding-modes898898 +Ref: Setting the rounding mode-Footnote-1902353 +Node: Arbitrary Precision Integers902532 +Ref: Arbitrary Precision Integers-Footnote-1905518 +Node: POSIX Floating Point Problems905667 +Ref: POSIX Floating Point Problems-Footnote-1909540 +Node: Floating point summary909578 +Node: Dynamic Extensions911772 +Node: Extension Intro913324 +Node: Plugin License914590 +Node: Extension Mechanism Outline915387 +Ref: figure-load-extension915815 +Ref: figure-register-new-function917295 +Ref: figure-call-new-function918299 +Node: Extension API Description920285 +Node: Extension API Functions Introduction921735 +Node: General Data Types926559 +Ref: General Data Types-Footnote-1932298 +Node: Memory Allocation Functions932597 +Ref: Memory Allocation Functions-Footnote-1935436 +Node: Constructor Functions935532 +Node: Registration Functions937266 +Node: Extension Functions937951 +Node: Exit Callback Functions940248 +Node: Extension Version String941496 +Node: Input Parsers942161 +Node: Output Wrappers952040 +Node: Two-way processors956555 +Node: Printing Messages958759 +Ref: Printing Messages-Footnote-1959835 +Node: Updating `ERRNO'959987 +Node: Requesting Values960727 +Ref: table-value-types-returned961455 +Node: Accessing Parameters962412 +Node: Symbol Table Access963643 +Node: Symbol table by name964157 +Node: Symbol table by cookie966138 +Ref: Symbol table by cookie-Footnote-1970282 +Node: Cached values970345 +Ref: Cached values-Footnote-1973844 +Node: Array Manipulation973935 +Ref: Array Manipulation-Footnote-1975033 +Node: Array Data Types975070 +Ref: Array Data Types-Footnote-1977725 +Node: Array Functions977817 +Node: Flattening Arrays981671 +Node: Creating Arrays988563 +Node: Extension API Variables993334 +Node: Extension Versioning993970 +Node: Extension API Informational Variables995871 +Node: Extension API Boilerplate996936 +Node: Finding Extensions1000745 +Node: Extension Example1001305 +Node: Internal File Description1002077 +Node: Internal File Ops1006144 +Ref: Internal File Ops-Footnote-11017814 +Node: Using Internal File Ops1017954 +Ref: Using Internal File Ops-Footnote-11020337 +Node: Extension Samples1020610 +Node: Extension Sample File Functions1022136 +Node: Extension Sample Fnmatch1029774 +Node: Extension Sample Fork1031265 +Node: Extension Sample Inplace1032480 +Node: Extension Sample Ord1034155 +Node: Extension Sample Readdir1034991 +Ref: table-readdir-file-types1035867 +Node: Extension Sample Revout1036678 +Node: Extension Sample Rev2way1037268 +Node: Extension Sample Read write array1038008 +Node: Extension Sample Readfile1039948 +Node: Extension Sample Time1041043 +Node: Extension Sample API Tests1042392 +Node: gawkextlib1042883 +Node: Extension summary1045541 +Node: Extension Exercises1049230 +Node: Language History1049952 +Node: V7/SVR3.11051608 +Node: SVR41053789 +Node: POSIX1055234 +Node: BTL1056623 +Node: POSIX/GNU1057357 +Node: Feature History1062921 +Node: Common Extensions1076019 +Node: Ranges and Locales1077343 +Ref: Ranges and Locales-Footnote-11081961 +Ref: Ranges and Locales-Footnote-21081988 +Ref: Ranges and Locales-Footnote-31082222 +Node: Contributors1082443 +Node: History summary1087984 +Node: Installation1089354 +Node: Gawk Distribution1090300 +Node: Getting1090784 +Node: Extracting1091607 +Node: Distribution contents1093242 +Node: Unix Installation1098959 +Node: Quick Installation1099576 +Node: Additional Configuration Options1102000 +Node: Configuration Philosophy1103738 +Node: Non-Unix Installation1106107 +Node: PC Installation1106565 +Node: PC Binary Installation1107884 +Node: PC Compiling1109732 +Ref: PC Compiling-Footnote-11112753 +Node: PC Testing1112862 +Node: PC Using1114038 +Node: Cygwin1118153 +Node: MSYS1118976 +Node: VMS Installation1119476 +Node: VMS Compilation1120268 +Ref: VMS Compilation-Footnote-11121490 +Node: VMS Dynamic Extensions1121548 +Node: VMS Installation Details1123232 +Node: VMS Running1125484 +Node: VMS GNV1128320 +Node: VMS Old Gawk1129054 +Node: Bugs1129524 +Node: Other Versions1133407 +Node: Installation summary1139831 +Node: Notes1140887 +Node: Compatibility Mode1141752 +Node: Additions1142534 +Node: Accessing The Source1143459 +Node: Adding Code1144894 +Node: New Ports1151051 +Node: Derived Files1155533 +Ref: Derived Files-Footnote-11161008 +Ref: Derived Files-Footnote-21161042 +Ref: Derived Files-Footnote-31161638 +Node: Future Extensions1161752 +Node: Implementation Limitations1162358 +Node: Extension Design1163606 +Node: Old Extension Problems1164760 +Ref: Old Extension Problems-Footnote-11166277 +Node: Extension New Mechanism Goals1166334 +Ref: Extension New Mechanism Goals-Footnote-11169694 +Node: Extension Other Design Decisions1169883 +Node: Extension Future Growth1171991 +Node: Old Extension Mechanism1172827 +Node: Notes summary1174589 +Node: Basic Concepts1175775 +Node: Basic High Level1176456 +Ref: figure-general-flow1176728 +Ref: figure-process-flow1177327 +Ref: Basic High Level-Footnote-11180556 +Node: Basic Data Typing1180741 +Node: Glossary1184069 +Node: Copying1215998 +Node: GNU Free Documentation License1253554 +Node: Index1278690  End Tag Table -- cgit v1.2.3 From 762f30020bfa5e333345adc25d34da84918faa96 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 26 Jan 2015 22:35:52 +0200 Subject: More O'Reilly fixes. --- doc/gawk.info | 801 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 401 insertions(+), 400 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index e32e2511..ef092701 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10125,11 +10125,11 @@ description of each variable.) use binary I/O. Any other string value is treated the same as `"rw"', but causes `gawk' to generate a warning message. `BINMODE' is described in more detail in *note PC Using::. `mawk' - (*note Other Versions::), also supports this variable, but only + (*note Other Versions::) also supports this variable, but only using numeric values. ``CONVFMT'' - This string controls conversion of numbers to strings (*note + A string that controls the conversion of numbers to strings (*note Conversion::). It works by being passed, in effect, as the first argument to the `sprintf()' function (*note String Functions::). Its default value is `"%.6g"'. `CONVFMT' was introduced by the @@ -10176,7 +10176,7 @@ description of each variable.) `IGNORECASE #' If `IGNORECASE' is nonzero or non-null, then all string comparisons - and all regular expression matching are case independent. Thus, + and all regular expression matching are case-independent. Thus, regexp matching with `~' and `!~', as well as the `gensub()', `gsub()', `index()', `match()', `patsplit()', `split()', and `sub()' functions, record termination with `RS', and field @@ -10196,7 +10196,7 @@ description of each variable.) Assigning a false value to `LINT' turns off the lint warnings. This variable is a `gawk' extension. It is not special in other - `awk' implementations. Unlike the other special variables, + `awk' implementations. Unlike with the other special variables, changing `LINT' does affect the production of lint warnings, even if `gawk' is in compatibility mode. Much as the `--lint' and `--traditional' options independently control different aspects of @@ -10204,17 +10204,18 @@ description of each variable.) execution is independent of the flavor of `awk' being executed. `OFMT' - Controls conversion of numbers to strings (*note Conversion::) for - printing with the `print' statement. It works by being passed as - the first argument to the `sprintf()' function (*note String - Functions::). Its default value is `"%.6g"'. Earlier versions of - `awk' used `OFMT' to specify the format for converting numbers to - strings in general expressions; this is now done by `CONVFMT'. + A string that controls conversion of numbers to strings (*note + Conversion::) for printing with the `print' statement. It works + by being passed as the first argument to the `sprintf()' function + (*note String Functions::). Its default value is `"%.6g"'. + Earlier versions of `awk' used `OFMT' to specify the format for + converting numbers to strings in general expressions; this is now + done by `CONVFMT'. `OFS' - This is the output field separator (*note Output Separators::). - It is output between the fields printed by a `print' statement. - Its default value is `" "', a string consisting of a single space. + The output field separator (*note Output Separators::). It is + output between the fields printed by a `print' statement. Its + default value is `" "', a string consisting of a single space. `ORS' The output record separator. It is output at the end of every @@ -10264,7 +10265,7 @@ description of each variable.)  File: gawk.info, Node: Auto-set, Next: ARGC and ARGV, Prev: User-modified, Up: Built-in Variables -7.5.2 Built-In Variables That Convey Information +7.5.2 Built-in Variables That Convey Information ------------------------------------------------ The following is an alphabetical list of variables that `awk' sets @@ -10368,14 +10369,14 @@ Options::), they are not special: `NF' The number of fields in the current input record. `NF' is set - each time a new record is read, when a new field is created or + each time a new record is read, when a new field is created, or when `$0' changes (*note Fields::). Unlike most of the variables described in this node, assigning a value to `NF' has the potential to affect `awk''s internal workings. In particular, assignments to `NF' can be used to - create or remove fields from the current record. *Note Changing - Fields::. + create fields in or remove fields from the current record. *Note + Changing Fields::. `FUNCTAB #' An array whose indices and corresponding values are the names of @@ -10410,7 +10411,7 @@ Options::), they are not special: `PROCINFO["identifiers"]' A subarray, indexed by the names of all identifiers used in - the text of the AWK program. An "identifier" is simply the + the text of the `awk' program. An "identifier" is simply the name of a variable (be it scalar or array), built-in function, user-defined function, or extension function. For each identifier, the value of the element is one of the @@ -10431,7 +10432,7 @@ Options::), they are not special: `"untyped"' The identifier is untyped (could be used as a scalar or - array, `gawk' doesn't know yet). + an array; `gawk' doesn't know yet). `"user"' The identifier is a user-defined function. @@ -10520,7 +10521,7 @@ Options::), they are not special: string, or -1 if no match is found. `RSTART' - The start-index in characters of the substring that is matched by + The start index in characters of the substring that is matched by the `match()' function (*note String Functions::). `RSTART' is set by invoking the `match()' function. Its value is the position of the string where the matched substring starts, or zero if no @@ -10570,7 +10571,7 @@ Options::), they are not special: } NOTE: In order to avoid severe time-travel paradoxes,(2) - neither `FUNCTAB' nor `SYMTAB' are available as elements + neither `FUNCTAB' nor `SYMTAB' is available as an element within the `SYMTAB' array. Changing `NR' and `FNR' @@ -10709,7 +10710,7 @@ are passed on to the `awk' program. (*Note Getopt Function::, for an When designing your program, you should choose options that don't conflict with `gawk''s, because it will process any options that it accepts before passing the rest of the command line on to your program. -Using `#!' with the `-E' option may help (*Note Executable Scripts::, +Using `#!' with the `-E' option may help (*note Executable Scripts::, and *note Options::,).  @@ -10720,14 +10721,14 @@ File: gawk.info, Node: Pattern Action Summary, Prev: Built-in Variables, Up: * Pattern-action pairs make up the basic elements of an `awk' program. Patterns are either normal expressions, range - expressions, regexp constants, one of the special keywords - `BEGIN', `END', `BEGINFILE', `ENDFILE', or empty. The action + expressions, or regexp constants; one of the special keywords + `BEGIN', `END', `BEGINFILE', or `ENDFILE'; or empty. The action executes if the current record matches the pattern. Empty (missing) patterns match all records. - * I/O from `BEGIN' and `END' rules have certain constraints. This - is also true, only more so, for `BEGINFILE' and `ENDFILE' rules. - The latter two give you "hooks" into `gawk''s file processing, + * I/O from `BEGIN' and `END' rules has certain constraints. This is + also true, only more so, for `BEGINFILE' and `ENDFILE' rules. The + latter two give you "hooks" into `gawk''s file processing, allowing you to recover from a file that otherwise would cause a fatal error (such as a file that cannot be opened). @@ -10748,11 +10749,11 @@ File: gawk.info, Node: Pattern Action Summary, Prev: Built-in Variables, Up: iteration of a loop (or get out of a `switch'). * `next' and `nextfile' let you read the next record and start over - at the top of your program, or skip to the next input file and + at the top of your program or skip to the next input file and start over, respectively. * The `exit' statement terminates your program. When executed from - an action (or function body) it transfers control to the `END' + an action (or function body), it transfers control to the `END' statements. From an `END' statement body, it exits immediately. You may pass an optional numeric value to be used as `awk''s exit status. @@ -32489,7 +32490,7 @@ Index (line 77) * differences in awk and gawk, SYMTAB variable: Auto-set. (line 269) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. - (line 151) + (line 152) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. (line 66) * directories, command-line: Command-line directories. @@ -32977,7 +32978,7 @@ Index * gawk, splitting fields and: Constant Size. (line 87) * gawk, string-translation functions: I18N Functions. (line 6) * gawk, SYMTAB array in: Auto-set. (line 269) -* gawk, TEXTDOMAIN variable in: User-modified. (line 151) +* gawk, TEXTDOMAIN variable in: User-modified. (line 152) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 34) * gawk, versions of, information about, printing: Options. (line 302) @@ -33175,7 +33176,7 @@ Index * internationalization: I18N Functions. (line 6) * internationalization, localization <1>: Internationalization. (line 13) -* internationalization, localization: User-modified. (line 151) +* internationalization, localization: User-modified. (line 152) * internationalization, localization, character classes: Bracket Expressions. (line 101) * internationalization, localization, gawk and: Internationalization. @@ -33471,7 +33472,7 @@ Index * OFMT variable <2>: Strings And Numbers. (line 57) * OFMT variable: OFMT. (line 15) * OFMT variable, POSIX awk and: OFMT. (line 27) -* OFS variable <1>: User-modified. (line 113) +* OFS variable <1>: User-modified. (line 114) * OFS variable <2>: Output Separators. (line 6) * OFS variable: Changing Fields. (line 64) * OpenBSD: Glossary. (line 753) @@ -33524,7 +33525,7 @@ Index (line 12) * ord() user-defined function: Ordinal Functions. (line 16) * order of evaluation, concatenation: Concatenation. (line 41) -* ORS variable <1>: User-modified. (line 118) +* ORS variable <1>: User-modified. (line 119) * ORS variable: Output Separators. (line 21) * output field separator, See OFS variable: Changing Fields. (line 64) * output record separator, See ORS variable: Output Separators. @@ -33664,7 +33665,7 @@ Index * POSIX, gawk extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in awk: Clones. (line 6) * POSIXLY_CORRECT environment variable: Options. (line 341) -* PREC variable: User-modified. (line 123) +* PREC variable: User-modified. (line 124) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) * precedence, regexp operators: Regexp Operators. (line 156) @@ -33679,7 +33680,7 @@ Index * print statement, commas, omitting: Print Examples. (line 31) * print statement, I/O operators in: Precedence. (line 71) * print statement, line continuations and: Print Examples. (line 76) -* print statement, OFMT variable and: User-modified. (line 113) +* print statement, OFMT variable and: User-modified. (line 114) * print statement, See Also redirection, of output: Redirection. (line 17) * print statement, sprintf() function and: Round Function. (line 6) @@ -33794,7 +33795,7 @@ Index * readfile() user-defined function: Readfile Function. (line 30) * reading input files: Reading Files. (line 6) * recipe for a programming language: History. (line 6) -* record separators <1>: User-modified. (line 132) +* record separators <1>: User-modified. (line 133) * record separators: awk split records. (line 6) * record separators, changing: awk split records. (line 85) * record separators, regular expressions as: awk split records. @@ -33906,8 +33907,8 @@ Index * round to nearest integer: Numeric Functions. (line 23) * round() user-defined function: Round Function. (line 16) * rounding numbers: Round Function. (line 6) -* ROUNDMODE variable: User-modified. (line 127) -* RS variable <1>: User-modified. (line 132) +* ROUNDMODE variable: User-modified. (line 128) +* RS variable <1>: User-modified. (line 133) * RS variable: awk split records. (line 12) * RS variable, multiline records and: Multiple Line. (line 17) * rshift: Bitwise Functions. (line 53) @@ -33964,12 +33965,12 @@ Index * separators, field, FIELDWIDTHS variable and: User-modified. (line 37) * separators, field, FPAT variable and: User-modified. (line 43) * separators, field, POSIX and: Fields. (line 6) -* separators, for records <1>: User-modified. (line 132) +* separators, for records <1>: User-modified. (line 133) * separators, for records: awk split records. (line 6) * separators, for records, regular expressions as: awk split records. (line 125) * separators, for statements in actions: Action Overview. (line 19) -* separators, subscript: User-modified. (line 145) +* separators, subscript: User-modified. (line 146) * set breakpoint: Breakpoint Control. (line 11) * set debugger command: Viewing And Changing Data. (line 59) @@ -34101,7 +34102,7 @@ Index * split.awk program: Split Program. (line 30) * sprintf <1>: String Functions. (line 383) * sprintf: OFMT. (line 15) -* sprintf() function, OFMT variable and: User-modified. (line 113) +* sprintf() function, OFMT variable and: User-modified. (line 114) * sprintf() function, print/printf statements and: Round Function. (line 6) * sqrt: Numeric Functions. (line 77) @@ -34163,7 +34164,7 @@ Index (line 43) * sub() function, arguments of: String Functions. (line 462) * sub() function, escape processing: Gory Details. (line 6) -* subscript separators: User-modified. (line 145) +* subscript separators: User-modified. (line 146) * subscripts in arrays, multidimensional: Multidimensional. (line 10) * subscripts in arrays, multidimensional, scanning: Multiscanning. (line 11) @@ -34171,7 +34172,7 @@ Index (line 6) * subscripts in arrays, uninitialized variables as: Uninitialized Subscripts. (line 6) -* SUBSEP variable: User-modified. (line 145) +* SUBSEP variable: User-modified. (line 146) * SUBSEP variable, and multidimensional arrays: Multidimensional. (line 16) * substitute in string: String Functions. (line 90) @@ -34210,7 +34211,7 @@ Index * text, printing: Print. (line 22) * text, printing, unduplicated lines of: Uniq Program. (line 6) * TEXTDOMAIN variable <1>: Programmer i18n. (line 9) -* TEXTDOMAIN variable: User-modified. (line 151) +* TEXTDOMAIN variable: User-modified. (line 152) * TEXTDOMAIN variable, BEGIN pattern and: Programmer i18n. (line 60) * TEXTDOMAIN variable, portability and: I18N Portability. (line 20) * textdomain() function (C library): Explaining gettext. (line 28) @@ -34649,360 +34650,360 @@ Node: Nextfile Statement426645 Node: Exit Statement429273 Node: Built-in Variables431684 Node: User-modified432817 -Ref: User-modified-Footnote-1440498 -Node: Auto-set440560 -Ref: Auto-set-Footnote-1453595 -Ref: Auto-set-Footnote-2453800 -Node: ARGC and ARGV453856 -Node: Pattern Action Summary458074 -Node: Arrays460501 -Node: Array Basics461830 -Node: Array Intro462674 -Ref: figure-array-elements464638 -Ref: Array Intro-Footnote-1467164 -Node: Reference to Elements467292 -Node: Assigning Elements469744 -Node: Array Example470235 -Node: Scanning an Array471993 -Node: Controlling Scanning475009 -Ref: Controlling Scanning-Footnote-1480205 -Node: Numeric Array Subscripts480521 -Node: Uninitialized Subscripts482706 -Node: Delete484323 -Ref: Delete-Footnote-1487066 -Node: Multidimensional487123 -Node: Multiscanning490220 -Node: Arrays of Arrays491809 -Node: Arrays Summary496568 -Node: Functions498660 -Node: Built-in499559 -Node: Calling Built-in500637 -Node: Numeric Functions502628 -Ref: Numeric Functions-Footnote-1506645 -Ref: Numeric Functions-Footnote-2507002 -Ref: Numeric Functions-Footnote-3507050 -Node: String Functions507322 -Ref: String Functions-Footnote-1530797 -Ref: String Functions-Footnote-2530926 -Ref: String Functions-Footnote-3531174 -Node: Gory Details531261 -Ref: table-sub-escapes533042 -Ref: table-sub-proposed534562 -Ref: table-posix-sub535926 -Ref: table-gensub-escapes537462 -Ref: Gory Details-Footnote-1538294 -Node: I/O Functions538445 -Ref: I/O Functions-Footnote-1545663 -Node: Time Functions545810 -Ref: Time Functions-Footnote-1556298 -Ref: Time Functions-Footnote-2556366 -Ref: Time Functions-Footnote-3556524 -Ref: Time Functions-Footnote-4556635 -Ref: Time Functions-Footnote-5556747 -Ref: Time Functions-Footnote-6556974 -Node: Bitwise Functions557240 -Ref: table-bitwise-ops557802 -Ref: Bitwise Functions-Footnote-1562111 -Node: Type Functions562280 -Node: I18N Functions563431 -Node: User-defined565076 -Node: Definition Syntax565881 -Ref: Definition Syntax-Footnote-1571288 -Node: Function Example571359 -Ref: Function Example-Footnote-1574278 -Node: Function Caveats574300 -Node: Calling A Function574818 -Node: Variable Scope575776 -Node: Pass By Value/Reference578764 -Node: Return Statement582259 -Node: Dynamic Typing585240 -Node: Indirect Calls586169 -Ref: Indirect Calls-Footnote-1597471 -Node: Functions Summary597599 -Node: Library Functions600301 -Ref: Library Functions-Footnote-1603910 -Ref: Library Functions-Footnote-2604053 -Node: Library Names604224 -Ref: Library Names-Footnote-1607678 -Ref: Library Names-Footnote-2607901 -Node: General Functions607987 -Node: Strtonum Function609090 -Node: Assert Function612112 -Node: Round Function615436 -Node: Cliff Random Function616977 -Node: Ordinal Functions617993 -Ref: Ordinal Functions-Footnote-1621056 -Ref: Ordinal Functions-Footnote-2621308 -Node: Join Function621519 -Ref: Join Function-Footnote-1623288 -Node: Getlocaltime Function623488 -Node: Readfile Function627232 -Node: Shell Quoting629202 -Node: Data File Management630603 -Node: Filetrans Function631235 -Node: Rewind Function635291 -Node: File Checking636678 -Ref: File Checking-Footnote-1638010 -Node: Empty Files638211 -Node: Ignoring Assigns640190 -Node: Getopt Function641741 -Ref: Getopt Function-Footnote-1653203 -Node: Passwd Functions653403 -Ref: Passwd Functions-Footnote-1662240 -Node: Group Functions662328 -Ref: Group Functions-Footnote-1670222 -Node: Walking Arrays670435 -Node: Library Functions Summary672038 -Node: Library Exercises673439 -Node: Sample Programs674719 -Node: Running Examples675489 -Node: Clones676217 -Node: Cut Program677441 -Node: Egrep Program687160 -Ref: Egrep Program-Footnote-1694658 -Node: Id Program694768 -Node: Split Program698413 -Ref: Split Program-Footnote-1701861 -Node: Tee Program701989 -Node: Uniq Program704778 -Node: Wc Program712197 -Ref: Wc Program-Footnote-1716447 -Node: Miscellaneous Programs716541 -Node: Dupword Program717754 -Node: Alarm Program719785 -Node: Translate Program724589 -Ref: Translate Program-Footnote-1729154 -Node: Labels Program729424 -Ref: Labels Program-Footnote-1732775 -Node: Word Sorting732859 -Node: History Sorting736930 -Node: Extract Program738766 -Node: Simple Sed746291 -Node: Igawk Program749359 -Ref: Igawk Program-Footnote-1763683 -Ref: Igawk Program-Footnote-2763884 -Ref: Igawk Program-Footnote-3764006 -Node: Anagram Program764121 -Node: Signature Program767178 -Node: Programs Summary768425 -Node: Programs Exercises769618 -Ref: Programs Exercises-Footnote-1773749 -Node: Advanced Features773840 -Node: Nondecimal Data775788 -Node: Array Sorting777378 -Node: Controlling Array Traversal778075 -Ref: Controlling Array Traversal-Footnote-1786408 -Node: Array Sorting Functions786526 -Ref: Array Sorting Functions-Footnote-1790415 -Node: Two-way I/O790611 -Ref: Two-way I/O-Footnote-1795556 -Ref: Two-way I/O-Footnote-2795742 -Node: TCP/IP Networking795824 -Node: Profiling798697 -Node: Advanced Features Summary806244 -Node: Internationalization808177 -Node: I18N and L10N809657 -Node: Explaining gettext810343 -Ref: Explaining gettext-Footnote-1815368 -Ref: Explaining gettext-Footnote-2815552 -Node: Programmer i18n815717 -Ref: Programmer i18n-Footnote-1820583 -Node: Translator i18n820632 -Node: String Extraction821426 -Ref: String Extraction-Footnote-1822557 -Node: Printf Ordering822643 -Ref: Printf Ordering-Footnote-1825429 -Node: I18N Portability825493 -Ref: I18N Portability-Footnote-1827948 -Node: I18N Example828011 -Ref: I18N Example-Footnote-1830814 -Node: Gawk I18N830886 -Node: I18N Summary831524 -Node: Debugger832863 -Node: Debugging833885 -Node: Debugging Concepts834326 -Node: Debugging Terms836179 -Node: Awk Debugging838751 -Node: Sample Debugging Session839645 -Node: Debugger Invocation840165 -Node: Finding The Bug841549 -Node: List of Debugger Commands848024 -Node: Breakpoint Control849357 -Node: Debugger Execution Control853053 -Node: Viewing And Changing Data856417 -Node: Execution Stack859795 -Node: Debugger Info861432 -Node: Miscellaneous Debugger Commands865449 -Node: Readline Support870478 -Node: Limitations871370 -Node: Debugging Summary873484 -Node: Arbitrary Precision Arithmetic874652 -Node: Computer Arithmetic876068 -Ref: table-numeric-ranges879666 -Ref: Computer Arithmetic-Footnote-1880525 -Node: Math Definitions880582 -Ref: table-ieee-formats883870 -Ref: Math Definitions-Footnote-1884474 -Node: MPFR features884579 -Node: FP Math Caution886250 -Ref: FP Math Caution-Footnote-1887300 -Node: Inexactness of computations887669 -Node: Inexact representation888628 -Node: Comparing FP Values889985 -Node: Errors accumulate891067 -Node: Getting Accuracy892500 -Node: Try To Round895162 -Node: Setting precision896061 -Ref: table-predefined-precision-strings896745 -Node: Setting the rounding mode898534 -Ref: table-gawk-rounding-modes898898 -Ref: Setting the rounding mode-Footnote-1902353 -Node: Arbitrary Precision Integers902532 -Ref: Arbitrary Precision Integers-Footnote-1905518 -Node: POSIX Floating Point Problems905667 -Ref: POSIX Floating Point Problems-Footnote-1909540 -Node: Floating point summary909578 -Node: Dynamic Extensions911772 -Node: Extension Intro913324 -Node: Plugin License914590 -Node: Extension Mechanism Outline915387 -Ref: figure-load-extension915815 -Ref: figure-register-new-function917295 -Ref: figure-call-new-function918299 -Node: Extension API Description920285 -Node: Extension API Functions Introduction921735 -Node: General Data Types926559 -Ref: General Data Types-Footnote-1932298 -Node: Memory Allocation Functions932597 -Ref: Memory Allocation Functions-Footnote-1935436 -Node: Constructor Functions935532 -Node: Registration Functions937266 -Node: Extension Functions937951 -Node: Exit Callback Functions940248 -Node: Extension Version String941496 -Node: Input Parsers942161 -Node: Output Wrappers952040 -Node: Two-way processors956555 -Node: Printing Messages958759 -Ref: Printing Messages-Footnote-1959835 -Node: Updating `ERRNO'959987 -Node: Requesting Values960727 -Ref: table-value-types-returned961455 -Node: Accessing Parameters962412 -Node: Symbol Table Access963643 -Node: Symbol table by name964157 -Node: Symbol table by cookie966138 -Ref: Symbol table by cookie-Footnote-1970282 -Node: Cached values970345 -Ref: Cached values-Footnote-1973844 -Node: Array Manipulation973935 -Ref: Array Manipulation-Footnote-1975033 -Node: Array Data Types975070 -Ref: Array Data Types-Footnote-1977725 -Node: Array Functions977817 -Node: Flattening Arrays981671 -Node: Creating Arrays988563 -Node: Extension API Variables993334 -Node: Extension Versioning993970 -Node: Extension API Informational Variables995871 -Node: Extension API Boilerplate996936 -Node: Finding Extensions1000745 -Node: Extension Example1001305 -Node: Internal File Description1002077 -Node: Internal File Ops1006144 -Ref: Internal File Ops-Footnote-11017814 -Node: Using Internal File Ops1017954 -Ref: Using Internal File Ops-Footnote-11020337 -Node: Extension Samples1020610 -Node: Extension Sample File Functions1022136 -Node: Extension Sample Fnmatch1029774 -Node: Extension Sample Fork1031265 -Node: Extension Sample Inplace1032480 -Node: Extension Sample Ord1034155 -Node: Extension Sample Readdir1034991 -Ref: table-readdir-file-types1035867 -Node: Extension Sample Revout1036678 -Node: Extension Sample Rev2way1037268 -Node: Extension Sample Read write array1038008 -Node: Extension Sample Readfile1039948 -Node: Extension Sample Time1041043 -Node: Extension Sample API Tests1042392 -Node: gawkextlib1042883 -Node: Extension summary1045541 -Node: Extension Exercises1049230 -Node: Language History1049952 -Node: V7/SVR3.11051608 -Node: SVR41053789 -Node: POSIX1055234 -Node: BTL1056623 -Node: POSIX/GNU1057357 -Node: Feature History1062921 -Node: Common Extensions1076019 -Node: Ranges and Locales1077343 -Ref: Ranges and Locales-Footnote-11081961 -Ref: Ranges and Locales-Footnote-21081988 -Ref: Ranges and Locales-Footnote-31082222 -Node: Contributors1082443 -Node: History summary1087984 -Node: Installation1089354 -Node: Gawk Distribution1090300 -Node: Getting1090784 -Node: Extracting1091607 -Node: Distribution contents1093242 -Node: Unix Installation1098959 -Node: Quick Installation1099576 -Node: Additional Configuration Options1102000 -Node: Configuration Philosophy1103738 -Node: Non-Unix Installation1106107 -Node: PC Installation1106565 -Node: PC Binary Installation1107884 -Node: PC Compiling1109732 -Ref: PC Compiling-Footnote-11112753 -Node: PC Testing1112862 -Node: PC Using1114038 -Node: Cygwin1118153 -Node: MSYS1118976 -Node: VMS Installation1119476 -Node: VMS Compilation1120268 -Ref: VMS Compilation-Footnote-11121490 -Node: VMS Dynamic Extensions1121548 -Node: VMS Installation Details1123232 -Node: VMS Running1125484 -Node: VMS GNV1128320 -Node: VMS Old Gawk1129054 -Node: Bugs1129524 -Node: Other Versions1133407 -Node: Installation summary1139831 -Node: Notes1140887 -Node: Compatibility Mode1141752 -Node: Additions1142534 -Node: Accessing The Source1143459 -Node: Adding Code1144894 -Node: New Ports1151051 -Node: Derived Files1155533 -Ref: Derived Files-Footnote-11161008 -Ref: Derived Files-Footnote-21161042 -Ref: Derived Files-Footnote-31161638 -Node: Future Extensions1161752 -Node: Implementation Limitations1162358 -Node: Extension Design1163606 -Node: Old Extension Problems1164760 -Ref: Old Extension Problems-Footnote-11166277 -Node: Extension New Mechanism Goals1166334 -Ref: Extension New Mechanism Goals-Footnote-11169694 -Node: Extension Other Design Decisions1169883 -Node: Extension Future Growth1171991 -Node: Old Extension Mechanism1172827 -Node: Notes summary1174589 -Node: Basic Concepts1175775 -Node: Basic High Level1176456 -Ref: figure-general-flow1176728 -Ref: figure-process-flow1177327 -Ref: Basic High Level-Footnote-11180556 -Node: Basic Data Typing1180741 -Node: Glossary1184069 -Node: Copying1215998 -Node: GNU Free Documentation License1253554 -Node: Index1278690 +Ref: User-modified-Footnote-1440520 +Node: Auto-set440582 +Ref: Auto-set-Footnote-1453634 +Ref: Auto-set-Footnote-2453839 +Node: ARGC and ARGV453895 +Node: Pattern Action Summary458113 +Node: Arrays460546 +Node: Array Basics461875 +Node: Array Intro462719 +Ref: figure-array-elements464683 +Ref: Array Intro-Footnote-1467209 +Node: Reference to Elements467337 +Node: Assigning Elements469789 +Node: Array Example470280 +Node: Scanning an Array472038 +Node: Controlling Scanning475054 +Ref: Controlling Scanning-Footnote-1480250 +Node: Numeric Array Subscripts480566 +Node: Uninitialized Subscripts482751 +Node: Delete484368 +Ref: Delete-Footnote-1487111 +Node: Multidimensional487168 +Node: Multiscanning490265 +Node: Arrays of Arrays491854 +Node: Arrays Summary496613 +Node: Functions498705 +Node: Built-in499604 +Node: Calling Built-in500682 +Node: Numeric Functions502673 +Ref: Numeric Functions-Footnote-1506690 +Ref: Numeric Functions-Footnote-2507047 +Ref: Numeric Functions-Footnote-3507095 +Node: String Functions507367 +Ref: String Functions-Footnote-1530842 +Ref: String Functions-Footnote-2530971 +Ref: String Functions-Footnote-3531219 +Node: Gory Details531306 +Ref: table-sub-escapes533087 +Ref: table-sub-proposed534607 +Ref: table-posix-sub535971 +Ref: table-gensub-escapes537507 +Ref: Gory Details-Footnote-1538339 +Node: I/O Functions538490 +Ref: I/O Functions-Footnote-1545708 +Node: Time Functions545855 +Ref: Time Functions-Footnote-1556343 +Ref: Time Functions-Footnote-2556411 +Ref: Time Functions-Footnote-3556569 +Ref: Time Functions-Footnote-4556680 +Ref: Time Functions-Footnote-5556792 +Ref: Time Functions-Footnote-6557019 +Node: Bitwise Functions557285 +Ref: table-bitwise-ops557847 +Ref: Bitwise Functions-Footnote-1562156 +Node: Type Functions562325 +Node: I18N Functions563476 +Node: User-defined565121 +Node: Definition Syntax565926 +Ref: Definition Syntax-Footnote-1571333 +Node: Function Example571404 +Ref: Function Example-Footnote-1574323 +Node: Function Caveats574345 +Node: Calling A Function574863 +Node: Variable Scope575821 +Node: Pass By Value/Reference578809 +Node: Return Statement582304 +Node: Dynamic Typing585285 +Node: Indirect Calls586214 +Ref: Indirect Calls-Footnote-1597516 +Node: Functions Summary597644 +Node: Library Functions600346 +Ref: Library Functions-Footnote-1603955 +Ref: Library Functions-Footnote-2604098 +Node: Library Names604269 +Ref: Library Names-Footnote-1607723 +Ref: Library Names-Footnote-2607946 +Node: General Functions608032 +Node: Strtonum Function609135 +Node: Assert Function612157 +Node: Round Function615481 +Node: Cliff Random Function617022 +Node: Ordinal Functions618038 +Ref: Ordinal Functions-Footnote-1621101 +Ref: Ordinal Functions-Footnote-2621353 +Node: Join Function621564 +Ref: Join Function-Footnote-1623333 +Node: Getlocaltime Function623533 +Node: Readfile Function627277 +Node: Shell Quoting629247 +Node: Data File Management630648 +Node: Filetrans Function631280 +Node: Rewind Function635336 +Node: File Checking636723 +Ref: File Checking-Footnote-1638055 +Node: Empty Files638256 +Node: Ignoring Assigns640235 +Node: Getopt Function641786 +Ref: Getopt Function-Footnote-1653248 +Node: Passwd Functions653448 +Ref: Passwd Functions-Footnote-1662285 +Node: Group Functions662373 +Ref: Group Functions-Footnote-1670267 +Node: Walking Arrays670480 +Node: Library Functions Summary672083 +Node: Library Exercises673484 +Node: Sample Programs674764 +Node: Running Examples675534 +Node: Clones676262 +Node: Cut Program677486 +Node: Egrep Program687205 +Ref: Egrep Program-Footnote-1694703 +Node: Id Program694813 +Node: Split Program698458 +Ref: Split Program-Footnote-1701906 +Node: Tee Program702034 +Node: Uniq Program704823 +Node: Wc Program712242 +Ref: Wc Program-Footnote-1716492 +Node: Miscellaneous Programs716586 +Node: Dupword Program717799 +Node: Alarm Program719830 +Node: Translate Program724634 +Ref: Translate Program-Footnote-1729199 +Node: Labels Program729469 +Ref: Labels Program-Footnote-1732820 +Node: Word Sorting732904 +Node: History Sorting736975 +Node: Extract Program738811 +Node: Simple Sed746336 +Node: Igawk Program749404 +Ref: Igawk Program-Footnote-1763728 +Ref: Igawk Program-Footnote-2763929 +Ref: Igawk Program-Footnote-3764051 +Node: Anagram Program764166 +Node: Signature Program767223 +Node: Programs Summary768470 +Node: Programs Exercises769663 +Ref: Programs Exercises-Footnote-1773794 +Node: Advanced Features773885 +Node: Nondecimal Data775833 +Node: Array Sorting777423 +Node: Controlling Array Traversal778120 +Ref: Controlling Array Traversal-Footnote-1786453 +Node: Array Sorting Functions786571 +Ref: Array Sorting Functions-Footnote-1790460 +Node: Two-way I/O790656 +Ref: Two-way I/O-Footnote-1795601 +Ref: Two-way I/O-Footnote-2795787 +Node: TCP/IP Networking795869 +Node: Profiling798742 +Node: Advanced Features Summary806289 +Node: Internationalization808222 +Node: I18N and L10N809702 +Node: Explaining gettext810388 +Ref: Explaining gettext-Footnote-1815413 +Ref: Explaining gettext-Footnote-2815597 +Node: Programmer i18n815762 +Ref: Programmer i18n-Footnote-1820628 +Node: Translator i18n820677 +Node: String Extraction821471 +Ref: String Extraction-Footnote-1822602 +Node: Printf Ordering822688 +Ref: Printf Ordering-Footnote-1825474 +Node: I18N Portability825538 +Ref: I18N Portability-Footnote-1827993 +Node: I18N Example828056 +Ref: I18N Example-Footnote-1830859 +Node: Gawk I18N830931 +Node: I18N Summary831569 +Node: Debugger832908 +Node: Debugging833930 +Node: Debugging Concepts834371 +Node: Debugging Terms836224 +Node: Awk Debugging838796 +Node: Sample Debugging Session839690 +Node: Debugger Invocation840210 +Node: Finding The Bug841594 +Node: List of Debugger Commands848069 +Node: Breakpoint Control849402 +Node: Debugger Execution Control853098 +Node: Viewing And Changing Data856462 +Node: Execution Stack859840 +Node: Debugger Info861477 +Node: Miscellaneous Debugger Commands865494 +Node: Readline Support870523 +Node: Limitations871415 +Node: Debugging Summary873529 +Node: Arbitrary Precision Arithmetic874697 +Node: Computer Arithmetic876113 +Ref: table-numeric-ranges879711 +Ref: Computer Arithmetic-Footnote-1880570 +Node: Math Definitions880627 +Ref: table-ieee-formats883915 +Ref: Math Definitions-Footnote-1884519 +Node: MPFR features884624 +Node: FP Math Caution886295 +Ref: FP Math Caution-Footnote-1887345 +Node: Inexactness of computations887714 +Node: Inexact representation888673 +Node: Comparing FP Values890030 +Node: Errors accumulate891112 +Node: Getting Accuracy892545 +Node: Try To Round895207 +Node: Setting precision896106 +Ref: table-predefined-precision-strings896790 +Node: Setting the rounding mode898579 +Ref: table-gawk-rounding-modes898943 +Ref: Setting the rounding mode-Footnote-1902398 +Node: Arbitrary Precision Integers902577 +Ref: Arbitrary Precision Integers-Footnote-1905563 +Node: POSIX Floating Point Problems905712 +Ref: POSIX Floating Point Problems-Footnote-1909585 +Node: Floating point summary909623 +Node: Dynamic Extensions911817 +Node: Extension Intro913369 +Node: Plugin License914635 +Node: Extension Mechanism Outline915432 +Ref: figure-load-extension915860 +Ref: figure-register-new-function917340 +Ref: figure-call-new-function918344 +Node: Extension API Description920330 +Node: Extension API Functions Introduction921780 +Node: General Data Types926604 +Ref: General Data Types-Footnote-1932343 +Node: Memory Allocation Functions932642 +Ref: Memory Allocation Functions-Footnote-1935481 +Node: Constructor Functions935577 +Node: Registration Functions937311 +Node: Extension Functions937996 +Node: Exit Callback Functions940293 +Node: Extension Version String941541 +Node: Input Parsers942206 +Node: Output Wrappers952085 +Node: Two-way processors956600 +Node: Printing Messages958804 +Ref: Printing Messages-Footnote-1959880 +Node: Updating `ERRNO'960032 +Node: Requesting Values960772 +Ref: table-value-types-returned961500 +Node: Accessing Parameters962457 +Node: Symbol Table Access963688 +Node: Symbol table by name964202 +Node: Symbol table by cookie966183 +Ref: Symbol table by cookie-Footnote-1970327 +Node: Cached values970390 +Ref: Cached values-Footnote-1973889 +Node: Array Manipulation973980 +Ref: Array Manipulation-Footnote-1975078 +Node: Array Data Types975115 +Ref: Array Data Types-Footnote-1977770 +Node: Array Functions977862 +Node: Flattening Arrays981716 +Node: Creating Arrays988608 +Node: Extension API Variables993379 +Node: Extension Versioning994015 +Node: Extension API Informational Variables995916 +Node: Extension API Boilerplate996981 +Node: Finding Extensions1000790 +Node: Extension Example1001350 +Node: Internal File Description1002122 +Node: Internal File Ops1006189 +Ref: Internal File Ops-Footnote-11017859 +Node: Using Internal File Ops1017999 +Ref: Using Internal File Ops-Footnote-11020382 +Node: Extension Samples1020655 +Node: Extension Sample File Functions1022181 +Node: Extension Sample Fnmatch1029819 +Node: Extension Sample Fork1031310 +Node: Extension Sample Inplace1032525 +Node: Extension Sample Ord1034200 +Node: Extension Sample Readdir1035036 +Ref: table-readdir-file-types1035912 +Node: Extension Sample Revout1036723 +Node: Extension Sample Rev2way1037313 +Node: Extension Sample Read write array1038053 +Node: Extension Sample Readfile1039993 +Node: Extension Sample Time1041088 +Node: Extension Sample API Tests1042437 +Node: gawkextlib1042928 +Node: Extension summary1045586 +Node: Extension Exercises1049275 +Node: Language History1049997 +Node: V7/SVR3.11051653 +Node: SVR41053834 +Node: POSIX1055279 +Node: BTL1056668 +Node: POSIX/GNU1057402 +Node: Feature History1062966 +Node: Common Extensions1076064 +Node: Ranges and Locales1077388 +Ref: Ranges and Locales-Footnote-11082006 +Ref: Ranges and Locales-Footnote-21082033 +Ref: Ranges and Locales-Footnote-31082267 +Node: Contributors1082488 +Node: History summary1088029 +Node: Installation1089399 +Node: Gawk Distribution1090345 +Node: Getting1090829 +Node: Extracting1091652 +Node: Distribution contents1093287 +Node: Unix Installation1099004 +Node: Quick Installation1099621 +Node: Additional Configuration Options1102045 +Node: Configuration Philosophy1103783 +Node: Non-Unix Installation1106152 +Node: PC Installation1106610 +Node: PC Binary Installation1107929 +Node: PC Compiling1109777 +Ref: PC Compiling-Footnote-11112798 +Node: PC Testing1112907 +Node: PC Using1114083 +Node: Cygwin1118198 +Node: MSYS1119021 +Node: VMS Installation1119521 +Node: VMS Compilation1120313 +Ref: VMS Compilation-Footnote-11121535 +Node: VMS Dynamic Extensions1121593 +Node: VMS Installation Details1123277 +Node: VMS Running1125529 +Node: VMS GNV1128365 +Node: VMS Old Gawk1129099 +Node: Bugs1129569 +Node: Other Versions1133452 +Node: Installation summary1139876 +Node: Notes1140932 +Node: Compatibility Mode1141797 +Node: Additions1142579 +Node: Accessing The Source1143504 +Node: Adding Code1144939 +Node: New Ports1151096 +Node: Derived Files1155578 +Ref: Derived Files-Footnote-11161053 +Ref: Derived Files-Footnote-21161087 +Ref: Derived Files-Footnote-31161683 +Node: Future Extensions1161797 +Node: Implementation Limitations1162403 +Node: Extension Design1163651 +Node: Old Extension Problems1164805 +Ref: Old Extension Problems-Footnote-11166322 +Node: Extension New Mechanism Goals1166379 +Ref: Extension New Mechanism Goals-Footnote-11169739 +Node: Extension Other Design Decisions1169928 +Node: Extension Future Growth1172036 +Node: Old Extension Mechanism1172872 +Node: Notes summary1174634 +Node: Basic Concepts1175820 +Node: Basic High Level1176501 +Ref: figure-general-flow1176773 +Ref: figure-process-flow1177372 +Ref: Basic High Level-Footnote-11180601 +Node: Basic Data Typing1180786 +Node: Glossary1184114 +Node: Copying1216043 +Node: GNU Free Documentation License1253599 +Node: Index1278735  End Tag Table -- cgit v1.2.3 From 62fe40d1944810a79c13bd519a5f1157c49cefb6 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 27 Jan 2015 06:21:23 +0200 Subject: O'Reilly fixes. --- doc/gawk.info | 804 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 407 insertions(+), 397 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index ef092701..80cca4be 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10855,9 +10855,9 @@ languages allow arbitrary starting and ending indices--e.g., `15 .. 27'--but the size of the array is still fixed when the array is declared.) - A contiguous array of four elements might look like the following -example, conceptually, if the element values are 8, `"foo"', `""', and -30 as shown in *note figure-array-elements::: + A contiguous array of four elements might look like *note +figure-array-elements::, conceptually, if the element values are eight, +`"foo"', `""', and 30. +---------+---------+--------+---------+ | 8 | "foo" | "" | 30 | @r{Value} @@ -10866,17 +10866,19 @@ example, conceptually, if the element values are 8, `"foo"', `""', and Figure 8.1: A contiguous array Only the values are stored; the indices are implicit from the order of -the values. Here, 8 is the value at index zero, because 8 appears in the -position with zero elements before it. +the values. Here, eight is the value at index zero, because eight +appears in the position with zero elements before it. Arrays in `awk' are different--they are "associative". This means that each array is a collection of pairs--an index and its corresponding array element value: - Index 3 Value 30 - Index 1 Value "foo" - Index 0 Value 8 - Index 2 Value "" + Index Value +------------------------ + `3' `30' + `1' `"foo"' + `0' `8' + `2' `""' The pairs are shown in jumbled order because their order is irrelevant.(1) @@ -10885,11 +10887,13 @@ irrelevant.(1) at any time. For example, suppose a tenth element is added to the array whose value is `"number ten"'. The result is: - Index 10 Value "number ten" - Index 3 Value 30 - Index 1 Value "foo" - Index 0 Value 8 - Index 2 Value "" + Index Value +------------------------------- + `10' `"number ten"' + `3' `30' + `1' `"foo"' + `0' `8' + `2' `""' Now the array is "sparse", which just means some indices are missing. It has elements 0-3 and 10, but doesn't have elements 4, 5, 6, 7, 8, or @@ -10900,17 +10904,19 @@ have to be positive integers. Any number, or even a string, can be an index. For example, the following is an array that translates words from English to French: - Index "dog" Value "chien" - Index "cat" Value "chat" - Index "one" Value "un" - Index 1 Value "un" + Index Value +------------------------ + `"dog"' `"chien"' + `"cat"' `"chat"' + `"one"' `"un"' + `1' `"un"' Here we decided to translate the number one in both spelled-out and numeric form--thus illustrating that a single array can have both numbers and strings as indices. (In fact, array subscripts are always strings. There are some subtleties to how numbers work when used as array subscripts; this is discussed in more detail in *note Numeric -Array Subscripts::.) Here, the number `1' isn't double quoted, because +Array Subscripts::.) Here, the number `1' isn't double-quoted, because `awk' automatically converts it to a string. The value of `IGNORECASE' has no effect upon array subscripting. @@ -10934,7 +10940,7 @@ File: gawk.info, Node: Reference to Elements, Next: Assigning Elements, Prev: ----------------------------------- The principal way to use an array is to refer to one of its elements. -An array reference is an expression as follows: +An "array reference" is an expression as follows: ARRAY[INDEX-EXPRESSION] @@ -10942,8 +10948,8 @@ Here, ARRAY is the name of an array. The expression INDEX-EXPRESSION is the index of the desired element of the array. The value of the array reference is the current value of that array -element. For example, `foo[4.3]' is an expression for the element of -array `foo' at index `4.3'. +element. For example, `foo[4.3]' is an expression referencing the +element of array `foo' at index `4.3'. A reference to an array element that has no recorded value yields a value of `""', the null string. This includes elements that have not @@ -11010,7 +11016,7 @@ File: gawk.info, Node: Array Example, Next: Scanning an Array, Prev: Assignin The following program takes a list of lines, each beginning with a line number, and prints them out in order of line number. The line numbers -are not in order when they are first read--instead they are scrambled. +are not in order when they are first read--instead, they are scrambled. This program sorts the lines by making an array using the line numbers as subscripts. The program then prints out the lines in sorted order of their numbers. It is a very simple program and gets confused upon @@ -11081,7 +11087,7 @@ has previously used, with the variable VAR set to that index. The following program uses this form of the `for' statement. The first rule scans the input records and notes which words appear (at least once) in the input, by storing a one into the array `used' with -the word as index. The second rule scans the elements of `used' to +the word as the index. The second rule scans the elements of `used' to find all the distinct words that appear in the input. It prints each word that is more than 10 characters long and also prints the number of such words. *Note String Functions::, for more information on the @@ -11164,7 +11170,7 @@ internal implementation of arrays and will vary from one version of Often, though, you may wish to do something simple, such as "traverse the array by comparing the indices in ascending order," or "traverse the array by comparing the values in descending order." -`gawk' provides two mechanisms which give you this control. +`gawk' provides two mechanisms that give you this control: * Set `PROCINFO["sorted_in"]' to one of a set of predefined values. We describe this now. @@ -11212,22 +11218,26 @@ available: which `gawk' uses internally to perform the sorting. `"@ind_str_desc"' - String indices ordered from high to low. + Like `"@ind_str_asc"', but the string indices are ordered from + high to low. `"@ind_num_desc"' - Numeric indices ordered from high to low. + Like `"@ind_num_asc"', but the numeric indices are ordered from + high to low. `"@val_type_desc"' - Element values, based on type, ordered from high to low. - Subarrays, if present, come out first. + Like `"@val_type_asc"', but the element values, based on type, are + ordered from high to low. Subarrays, if present, come out first. `"@val_str_desc"' - Element values, treated as strings, ordered from high to low. - Subarrays, if present, come out first. + Like `"@val_str_asc"', but the element values, treated as strings, + are ordered from high to low. Subarrays, if present, come out + first. `"@val_num_desc"' - Element values, treated as numbers, ordered from high to low. - Subarrays, if present, come out first. + Like `"@val_num_asc"', but the element values, treated as numbers, + are ordered from high to low. Subarrays, if present, come out + first. The array traversal order is determined before the `for' loop starts to run. Changing `PROCINFO["sorted_in"]' in the loop body does not @@ -11413,8 +11423,8 @@ deleting elements in an array: This example removes all the elements from the array `frequencies'. Once an element is deleted, a subsequent `for' statement to scan the -array does not report that element and the `in' operator to check for -the presence of that element returns zero (i.e., false): +array does not report that element and using the `in' operator to check +for the presence of that element returns zero (i.e., false): delete foo[4] if (4 in foo) @@ -11617,7 +11627,7 @@ two-element subarray at index `1' of the main array `a': This simulates a true two-dimensional array. Each subarray element can contain another subarray as a value, which in turn can hold other arrays as well. In this way, you can create arrays of three or more -dimensions. The indices can be any `awk' expression, including scalars +dimensions. The indices can be any `awk' expressions, including scalars separated by commas (i.e., a regular `awk' simulated multidimensional subscript). So the following is valid in `gawk': @@ -11626,7 +11636,7 @@ subscript). So the following is valid in `gawk': Each subarray and the main array can be of different length. In fact, the elements of an array or its subarray do not all have to have the same type. This means that the main array and any of its subarrays -can be non-rectangular, or jagged in structure. You can assign a scalar +can be nonrectangular, or jagged in structure. You can assign a scalar value to the index `4' of the main array `a', even though `a[1]' is itself an array and not a scalar: @@ -11644,8 +11654,8 @@ the element at that index: a[4][5][6][7] = "An element in a four-dimensional array" This removes the scalar value from index `4' and then inserts a -subarray of subarray of subarray containing a scalar. You can also -delete an entire subarray or subarray of subarrays: +three-level nested subarray containing a scalar. You can also delete an +entire subarray or subarray of subarrays: delete a[4][5] a[4][5] = "An element in subarray a[4]" @@ -11653,7 +11663,7 @@ delete an entire subarray or subarray of subarrays: But recall that you can not delete the main array `a' and then use it as a scalar. - The built-in functions which take array arguments can also be used + The built-in functions that take array arguments can also be used with subarrays. For example, the following code fragment uses `length()' (*note String Functions::) to determine the number of elements in the main array `a' and its subarrays: @@ -11674,7 +11684,7 @@ be nested to scan all the elements of an array of arrays if it is rectangular in structure. In order to print the contents (scalar values) of a two-dimensional array of arrays (i.e., in which each first-level element is itself an array, not necessarily of the same -length) you could use the following code: +length), you could use the following code: for (i in array) for (j in array[i]) @@ -11756,9 +11766,9 @@ File: gawk.info, Node: Arrays Summary, Prev: Arrays of Arrays, Up: Arrays of `awk'. * Standard `awk' simulates multidimensional arrays by separating - subscript values with a comma. The values are concatenated into a + subscript values with commas. The values are concatenated into a single string, separated by the value of `SUBSEP'. The fact that - such a subscript was created in this way is not retained; thus + such a subscript was created in this way is not retained; thus, changing `SUBSEP' may have unexpected consequences. You can use `(SUB1, SUB2, ...) in ARRAY' to see if such a multidimensional subscript exists in ARRAY. @@ -11766,7 +11776,7 @@ File: gawk.info, Node: Arrays Summary, Prev: Arrays of Arrays, Up: Arrays * `gawk' provides true arrays of arrays. You use a separate set of square brackets for each dimension in such an array: `data[row][col]', for example. Array elements may thus be either - scalar values (number or string) or another array. + scalar values (number or string) or other arrays. * Use the `isarray()' built-in function to determine if an array element is itself a subarray. @@ -12319,7 +12329,7 @@ Options::): split("cul-de-sac", a, "-", seps) - splits the string `cul-de-sac' into three fields using `-' as the + splits the string `"cul-de-sac"' into three fields using `-' as the separator. It sets the contents of the array `a' as follows: a[1] = "cul" @@ -31743,7 +31753,7 @@ Index * arrays: Arrays. (line 6) * arrays of arrays: Arrays of Arrays. (line 6) * arrays, an example of using: Array Example. (line 6) -* arrays, and IGNORECASE variable: Array Intro. (line 94) +* arrays, and IGNORECASE variable: Array Intro. (line 100) * arrays, as parameters to functions: Pass By Value/Reference. (line 44) * arrays, associative: Array Intro. (line 50) @@ -31770,7 +31780,7 @@ Index (line 6) * arrays, sorting, and IGNORECASE variable: Array Sorting Functions. (line 83) -* arrays, sparse: Array Intro. (line 72) +* arrays, sparse: Array Intro. (line 76) * arrays, subscripts, uninitialized variables as: Uninitialized Subscripts. (line 6) * arrays, unassigned elements: Reference to Elements. @@ -32063,7 +32073,7 @@ Index * case keyword: Switch Statement. (line 6) * case sensitivity, and regexps: User-modified. (line 76) * case sensitivity, and string comparisons: User-modified. (line 76) -* case sensitivity, array indices and: Array Intro. (line 94) +* case sensitivity, array indices and: Array Intro. (line 100) * case sensitivity, converting case: String Functions. (line 522) * case sensitivity, example programs: Library Functions. (line 53) * case sensitivity, gawk: Case-sensitivity. (line 26) @@ -32936,7 +32946,7 @@ Index * gawk, IGNORECASE variable in <1>: Array Sorting Functions. (line 83) * gawk, IGNORECASE variable in <2>: String Functions. (line 58) -* gawk, IGNORECASE variable in <3>: Array Intro. (line 94) +* gawk, IGNORECASE variable in <3>: Array Intro. (line 100) * gawk, IGNORECASE variable in <4>: User-modified. (line 76) * gawk, IGNORECASE variable in: Case-sensitivity. (line 26) * gawk, implementation issues: Notes. (line 6) @@ -33103,7 +33113,7 @@ Index * ignore breakpoint: Breakpoint Control. (line 87) * ignore debugger command: Breakpoint Control. (line 87) * IGNORECASE variable: User-modified. (line 76) -* IGNORECASE variable, and array indices: Array Intro. (line 94) +* IGNORECASE variable, and array indices: Array Intro. (line 100) * IGNORECASE variable, and array sorting functions: Array Sorting Functions. (line 83) * IGNORECASE variable, in example programs: Library Functions. @@ -34093,7 +34103,7 @@ Index * source code, QuikTrim Awk: Other Versions. (line 139) * source code, Solaris awk: Other Versions. (line 100) * source files, search path for: Programs Exercises. (line 70) -* sparse arrays: Array Intro. (line 72) +* sparse arrays: Array Intro. (line 76) * Spencer, Henry: Glossary. (line 16) * split: String Functions. (line 316) * split string into array: String Functions. (line 297) @@ -34659,351 +34669,351 @@ Node: Pattern Action Summary458113 Node: Arrays460546 Node: Array Basics461875 Node: Array Intro462719 -Ref: figure-array-elements464683 -Ref: Array Intro-Footnote-1467209 -Node: Reference to Elements467337 -Node: Assigning Elements469789 -Node: Array Example470280 -Node: Scanning an Array472038 -Node: Controlling Scanning475054 -Ref: Controlling Scanning-Footnote-1480250 -Node: Numeric Array Subscripts480566 -Node: Uninitialized Subscripts482751 -Node: Delete484368 -Ref: Delete-Footnote-1487111 -Node: Multidimensional487168 -Node: Multiscanning490265 -Node: Arrays of Arrays491854 -Node: Arrays Summary496613 -Node: Functions498705 -Node: Built-in499604 -Node: Calling Built-in500682 -Node: Numeric Functions502673 -Ref: Numeric Functions-Footnote-1506690 -Ref: Numeric Functions-Footnote-2507047 -Ref: Numeric Functions-Footnote-3507095 -Node: String Functions507367 -Ref: String Functions-Footnote-1530842 -Ref: String Functions-Footnote-2530971 -Ref: String Functions-Footnote-3531219 -Node: Gory Details531306 -Ref: table-sub-escapes533087 -Ref: table-sub-proposed534607 -Ref: table-posix-sub535971 -Ref: table-gensub-escapes537507 -Ref: Gory Details-Footnote-1538339 -Node: I/O Functions538490 -Ref: I/O Functions-Footnote-1545708 -Node: Time Functions545855 -Ref: Time Functions-Footnote-1556343 -Ref: Time Functions-Footnote-2556411 -Ref: Time Functions-Footnote-3556569 -Ref: Time Functions-Footnote-4556680 -Ref: Time Functions-Footnote-5556792 -Ref: Time Functions-Footnote-6557019 -Node: Bitwise Functions557285 -Ref: table-bitwise-ops557847 -Ref: Bitwise Functions-Footnote-1562156 -Node: Type Functions562325 -Node: I18N Functions563476 -Node: User-defined565121 -Node: Definition Syntax565926 -Ref: Definition Syntax-Footnote-1571333 -Node: Function Example571404 -Ref: Function Example-Footnote-1574323 -Node: Function Caveats574345 -Node: Calling A Function574863 -Node: Variable Scope575821 -Node: Pass By Value/Reference578809 -Node: Return Statement582304 -Node: Dynamic Typing585285 -Node: Indirect Calls586214 -Ref: Indirect Calls-Footnote-1597516 -Node: Functions Summary597644 -Node: Library Functions600346 -Ref: Library Functions-Footnote-1603955 -Ref: Library Functions-Footnote-2604098 -Node: Library Names604269 -Ref: Library Names-Footnote-1607723 -Ref: Library Names-Footnote-2607946 -Node: General Functions608032 -Node: Strtonum Function609135 -Node: Assert Function612157 -Node: Round Function615481 -Node: Cliff Random Function617022 -Node: Ordinal Functions618038 -Ref: Ordinal Functions-Footnote-1621101 -Ref: Ordinal Functions-Footnote-2621353 -Node: Join Function621564 -Ref: Join Function-Footnote-1623333 -Node: Getlocaltime Function623533 -Node: Readfile Function627277 -Node: Shell Quoting629247 -Node: Data File Management630648 -Node: Filetrans Function631280 -Node: Rewind Function635336 -Node: File Checking636723 -Ref: File Checking-Footnote-1638055 -Node: Empty Files638256 -Node: Ignoring Assigns640235 -Node: Getopt Function641786 -Ref: Getopt Function-Footnote-1653248 -Node: Passwd Functions653448 -Ref: Passwd Functions-Footnote-1662285 -Node: Group Functions662373 -Ref: Group Functions-Footnote-1670267 -Node: Walking Arrays670480 -Node: Library Functions Summary672083 -Node: Library Exercises673484 -Node: Sample Programs674764 -Node: Running Examples675534 -Node: Clones676262 -Node: Cut Program677486 -Node: Egrep Program687205 -Ref: Egrep Program-Footnote-1694703 -Node: Id Program694813 -Node: Split Program698458 -Ref: Split Program-Footnote-1701906 -Node: Tee Program702034 -Node: Uniq Program704823 -Node: Wc Program712242 -Ref: Wc Program-Footnote-1716492 -Node: Miscellaneous Programs716586 -Node: Dupword Program717799 -Node: Alarm Program719830 -Node: Translate Program724634 -Ref: Translate Program-Footnote-1729199 -Node: Labels Program729469 -Ref: Labels Program-Footnote-1732820 -Node: Word Sorting732904 -Node: History Sorting736975 -Node: Extract Program738811 -Node: Simple Sed746336 -Node: Igawk Program749404 -Ref: Igawk Program-Footnote-1763728 -Ref: Igawk Program-Footnote-2763929 -Ref: Igawk Program-Footnote-3764051 -Node: Anagram Program764166 -Node: Signature Program767223 -Node: Programs Summary768470 -Node: Programs Exercises769663 -Ref: Programs Exercises-Footnote-1773794 -Node: Advanced Features773885 -Node: Nondecimal Data775833 -Node: Array Sorting777423 -Node: Controlling Array Traversal778120 -Ref: Controlling Array Traversal-Footnote-1786453 -Node: Array Sorting Functions786571 -Ref: Array Sorting Functions-Footnote-1790460 -Node: Two-way I/O790656 -Ref: Two-way I/O-Footnote-1795601 -Ref: Two-way I/O-Footnote-2795787 -Node: TCP/IP Networking795869 -Node: Profiling798742 -Node: Advanced Features Summary806289 -Node: Internationalization808222 -Node: I18N and L10N809702 -Node: Explaining gettext810388 -Ref: Explaining gettext-Footnote-1815413 -Ref: Explaining gettext-Footnote-2815597 -Node: Programmer i18n815762 -Ref: Programmer i18n-Footnote-1820628 -Node: Translator i18n820677 -Node: String Extraction821471 -Ref: String Extraction-Footnote-1822602 -Node: Printf Ordering822688 -Ref: Printf Ordering-Footnote-1825474 -Node: I18N Portability825538 -Ref: I18N Portability-Footnote-1827993 -Node: I18N Example828056 -Ref: I18N Example-Footnote-1830859 -Node: Gawk I18N830931 -Node: I18N Summary831569 -Node: Debugger832908 -Node: Debugging833930 -Node: Debugging Concepts834371 -Node: Debugging Terms836224 -Node: Awk Debugging838796 -Node: Sample Debugging Session839690 -Node: Debugger Invocation840210 -Node: Finding The Bug841594 -Node: List of Debugger Commands848069 -Node: Breakpoint Control849402 -Node: Debugger Execution Control853098 -Node: Viewing And Changing Data856462 -Node: Execution Stack859840 -Node: Debugger Info861477 -Node: Miscellaneous Debugger Commands865494 -Node: Readline Support870523 -Node: Limitations871415 -Node: Debugging Summary873529 -Node: Arbitrary Precision Arithmetic874697 -Node: Computer Arithmetic876113 -Ref: table-numeric-ranges879711 -Ref: Computer Arithmetic-Footnote-1880570 -Node: Math Definitions880627 -Ref: table-ieee-formats883915 -Ref: Math Definitions-Footnote-1884519 -Node: MPFR features884624 -Node: FP Math Caution886295 -Ref: FP Math Caution-Footnote-1887345 -Node: Inexactness of computations887714 -Node: Inexact representation888673 -Node: Comparing FP Values890030 -Node: Errors accumulate891112 -Node: Getting Accuracy892545 -Node: Try To Round895207 -Node: Setting precision896106 -Ref: table-predefined-precision-strings896790 -Node: Setting the rounding mode898579 -Ref: table-gawk-rounding-modes898943 -Ref: Setting the rounding mode-Footnote-1902398 -Node: Arbitrary Precision Integers902577 -Ref: Arbitrary Precision Integers-Footnote-1905563 -Node: POSIX Floating Point Problems905712 -Ref: POSIX Floating Point Problems-Footnote-1909585 -Node: Floating point summary909623 -Node: Dynamic Extensions911817 -Node: Extension Intro913369 -Node: Plugin License914635 -Node: Extension Mechanism Outline915432 -Ref: figure-load-extension915860 -Ref: figure-register-new-function917340 -Ref: figure-call-new-function918344 -Node: Extension API Description920330 -Node: Extension API Functions Introduction921780 -Node: General Data Types926604 -Ref: General Data Types-Footnote-1932343 -Node: Memory Allocation Functions932642 -Ref: Memory Allocation Functions-Footnote-1935481 -Node: Constructor Functions935577 -Node: Registration Functions937311 -Node: Extension Functions937996 -Node: Exit Callback Functions940293 -Node: Extension Version String941541 -Node: Input Parsers942206 -Node: Output Wrappers952085 -Node: Two-way processors956600 -Node: Printing Messages958804 -Ref: Printing Messages-Footnote-1959880 -Node: Updating `ERRNO'960032 -Node: Requesting Values960772 -Ref: table-value-types-returned961500 -Node: Accessing Parameters962457 -Node: Symbol Table Access963688 -Node: Symbol table by name964202 -Node: Symbol table by cookie966183 -Ref: Symbol table by cookie-Footnote-1970327 -Node: Cached values970390 -Ref: Cached values-Footnote-1973889 -Node: Array Manipulation973980 -Ref: Array Manipulation-Footnote-1975078 -Node: Array Data Types975115 -Ref: Array Data Types-Footnote-1977770 -Node: Array Functions977862 -Node: Flattening Arrays981716 -Node: Creating Arrays988608 -Node: Extension API Variables993379 -Node: Extension Versioning994015 -Node: Extension API Informational Variables995916 -Node: Extension API Boilerplate996981 -Node: Finding Extensions1000790 -Node: Extension Example1001350 -Node: Internal File Description1002122 -Node: Internal File Ops1006189 -Ref: Internal File Ops-Footnote-11017859 -Node: Using Internal File Ops1017999 -Ref: Using Internal File Ops-Footnote-11020382 -Node: Extension Samples1020655 -Node: Extension Sample File Functions1022181 -Node: Extension Sample Fnmatch1029819 -Node: Extension Sample Fork1031310 -Node: Extension Sample Inplace1032525 -Node: Extension Sample Ord1034200 -Node: Extension Sample Readdir1035036 -Ref: table-readdir-file-types1035912 -Node: Extension Sample Revout1036723 -Node: Extension Sample Rev2way1037313 -Node: Extension Sample Read write array1038053 -Node: Extension Sample Readfile1039993 -Node: Extension Sample Time1041088 -Node: Extension Sample API Tests1042437 -Node: gawkextlib1042928 -Node: Extension summary1045586 -Node: Extension Exercises1049275 -Node: Language History1049997 -Node: V7/SVR3.11051653 -Node: SVR41053834 -Node: POSIX1055279 -Node: BTL1056668 -Node: POSIX/GNU1057402 -Node: Feature History1062966 -Node: Common Extensions1076064 -Node: Ranges and Locales1077388 -Ref: Ranges and Locales-Footnote-11082006 -Ref: Ranges and Locales-Footnote-21082033 -Ref: Ranges and Locales-Footnote-31082267 -Node: Contributors1082488 -Node: History summary1088029 -Node: Installation1089399 -Node: Gawk Distribution1090345 -Node: Getting1090829 -Node: Extracting1091652 -Node: Distribution contents1093287 -Node: Unix Installation1099004 -Node: Quick Installation1099621 -Node: Additional Configuration Options1102045 -Node: Configuration Philosophy1103783 -Node: Non-Unix Installation1106152 -Node: PC Installation1106610 -Node: PC Binary Installation1107929 -Node: PC Compiling1109777 -Ref: PC Compiling-Footnote-11112798 -Node: PC Testing1112907 -Node: PC Using1114083 -Node: Cygwin1118198 -Node: MSYS1119021 -Node: VMS Installation1119521 -Node: VMS Compilation1120313 -Ref: VMS Compilation-Footnote-11121535 -Node: VMS Dynamic Extensions1121593 -Node: VMS Installation Details1123277 -Node: VMS Running1125529 -Node: VMS GNV1128365 -Node: VMS Old Gawk1129099 -Node: Bugs1129569 -Node: Other Versions1133452 -Node: Installation summary1139876 -Node: Notes1140932 -Node: Compatibility Mode1141797 -Node: Additions1142579 -Node: Accessing The Source1143504 -Node: Adding Code1144939 -Node: New Ports1151096 -Node: Derived Files1155578 -Ref: Derived Files-Footnote-11161053 -Ref: Derived Files-Footnote-21161087 -Ref: Derived Files-Footnote-31161683 -Node: Future Extensions1161797 -Node: Implementation Limitations1162403 -Node: Extension Design1163651 -Node: Old Extension Problems1164805 -Ref: Old Extension Problems-Footnote-11166322 -Node: Extension New Mechanism Goals1166379 -Ref: Extension New Mechanism Goals-Footnote-11169739 -Node: Extension Other Design Decisions1169928 -Node: Extension Future Growth1172036 -Node: Old Extension Mechanism1172872 -Node: Notes summary1174634 -Node: Basic Concepts1175820 -Node: Basic High Level1176501 -Ref: figure-general-flow1176773 -Ref: figure-process-flow1177372 -Ref: Basic High Level-Footnote-11180601 -Node: Basic Data Typing1180786 -Node: Glossary1184114 -Node: Copying1216043 -Node: GNU Free Documentation License1253599 -Node: Index1278735 +Ref: figure-array-elements464653 +Ref: Array Intro-Footnote-1467273 +Node: Reference to Elements467401 +Node: Assigning Elements469863 +Node: Array Example470354 +Node: Scanning an Array472113 +Node: Controlling Scanning475133 +Ref: Controlling Scanning-Footnote-1480527 +Node: Numeric Array Subscripts480843 +Node: Uninitialized Subscripts483028 +Node: Delete484645 +Ref: Delete-Footnote-1487394 +Node: Multidimensional487451 +Node: Multiscanning490548 +Node: Arrays of Arrays492137 +Node: Arrays Summary496891 +Node: Functions498982 +Node: Built-in499881 +Node: Calling Built-in500959 +Node: Numeric Functions502950 +Ref: Numeric Functions-Footnote-1506967 +Ref: Numeric Functions-Footnote-2507324 +Ref: Numeric Functions-Footnote-3507372 +Node: String Functions507644 +Ref: String Functions-Footnote-1531121 +Ref: String Functions-Footnote-2531250 +Ref: String Functions-Footnote-3531498 +Node: Gory Details531585 +Ref: table-sub-escapes533366 +Ref: table-sub-proposed534886 +Ref: table-posix-sub536250 +Ref: table-gensub-escapes537786 +Ref: Gory Details-Footnote-1538618 +Node: I/O Functions538769 +Ref: I/O Functions-Footnote-1545987 +Node: Time Functions546134 +Ref: Time Functions-Footnote-1556622 +Ref: Time Functions-Footnote-2556690 +Ref: Time Functions-Footnote-3556848 +Ref: Time Functions-Footnote-4556959 +Ref: Time Functions-Footnote-5557071 +Ref: Time Functions-Footnote-6557298 +Node: Bitwise Functions557564 +Ref: table-bitwise-ops558126 +Ref: Bitwise Functions-Footnote-1562435 +Node: Type Functions562604 +Node: I18N Functions563755 +Node: User-defined565400 +Node: Definition Syntax566205 +Ref: Definition Syntax-Footnote-1571612 +Node: Function Example571683 +Ref: Function Example-Footnote-1574602 +Node: Function Caveats574624 +Node: Calling A Function575142 +Node: Variable Scope576100 +Node: Pass By Value/Reference579088 +Node: Return Statement582583 +Node: Dynamic Typing585564 +Node: Indirect Calls586493 +Ref: Indirect Calls-Footnote-1597795 +Node: Functions Summary597923 +Node: Library Functions600625 +Ref: Library Functions-Footnote-1604234 +Ref: Library Functions-Footnote-2604377 +Node: Library Names604548 +Ref: Library Names-Footnote-1608002 +Ref: Library Names-Footnote-2608225 +Node: General Functions608311 +Node: Strtonum Function609414 +Node: Assert Function612436 +Node: Round Function615760 +Node: Cliff Random Function617301 +Node: Ordinal Functions618317 +Ref: Ordinal Functions-Footnote-1621380 +Ref: Ordinal Functions-Footnote-2621632 +Node: Join Function621843 +Ref: Join Function-Footnote-1623612 +Node: Getlocaltime Function623812 +Node: Readfile Function627556 +Node: Shell Quoting629526 +Node: Data File Management630927 +Node: Filetrans Function631559 +Node: Rewind Function635615 +Node: File Checking637002 +Ref: File Checking-Footnote-1638334 +Node: Empty Files638535 +Node: Ignoring Assigns640514 +Node: Getopt Function642065 +Ref: Getopt Function-Footnote-1653527 +Node: Passwd Functions653727 +Ref: Passwd Functions-Footnote-1662564 +Node: Group Functions662652 +Ref: Group Functions-Footnote-1670546 +Node: Walking Arrays670759 +Node: Library Functions Summary672362 +Node: Library Exercises673763 +Node: Sample Programs675043 +Node: Running Examples675813 +Node: Clones676541 +Node: Cut Program677765 +Node: Egrep Program687484 +Ref: Egrep Program-Footnote-1694982 +Node: Id Program695092 +Node: Split Program698737 +Ref: Split Program-Footnote-1702185 +Node: Tee Program702313 +Node: Uniq Program705102 +Node: Wc Program712521 +Ref: Wc Program-Footnote-1716771 +Node: Miscellaneous Programs716865 +Node: Dupword Program718078 +Node: Alarm Program720109 +Node: Translate Program724913 +Ref: Translate Program-Footnote-1729478 +Node: Labels Program729748 +Ref: Labels Program-Footnote-1733099 +Node: Word Sorting733183 +Node: History Sorting737254 +Node: Extract Program739090 +Node: Simple Sed746615 +Node: Igawk Program749683 +Ref: Igawk Program-Footnote-1764007 +Ref: Igawk Program-Footnote-2764208 +Ref: Igawk Program-Footnote-3764330 +Node: Anagram Program764445 +Node: Signature Program767502 +Node: Programs Summary768749 +Node: Programs Exercises769942 +Ref: Programs Exercises-Footnote-1774073 +Node: Advanced Features774164 +Node: Nondecimal Data776112 +Node: Array Sorting777702 +Node: Controlling Array Traversal778399 +Ref: Controlling Array Traversal-Footnote-1786732 +Node: Array Sorting Functions786850 +Ref: Array Sorting Functions-Footnote-1790739 +Node: Two-way I/O790935 +Ref: Two-way I/O-Footnote-1795880 +Ref: Two-way I/O-Footnote-2796066 +Node: TCP/IP Networking796148 +Node: Profiling799021 +Node: Advanced Features Summary806568 +Node: Internationalization808501 +Node: I18N and L10N809981 +Node: Explaining gettext810667 +Ref: Explaining gettext-Footnote-1815692 +Ref: Explaining gettext-Footnote-2815876 +Node: Programmer i18n816041 +Ref: Programmer i18n-Footnote-1820907 +Node: Translator i18n820956 +Node: String Extraction821750 +Ref: String Extraction-Footnote-1822881 +Node: Printf Ordering822967 +Ref: Printf Ordering-Footnote-1825753 +Node: I18N Portability825817 +Ref: I18N Portability-Footnote-1828272 +Node: I18N Example828335 +Ref: I18N Example-Footnote-1831138 +Node: Gawk I18N831210 +Node: I18N Summary831848 +Node: Debugger833187 +Node: Debugging834209 +Node: Debugging Concepts834650 +Node: Debugging Terms836503 +Node: Awk Debugging839075 +Node: Sample Debugging Session839969 +Node: Debugger Invocation840489 +Node: Finding The Bug841873 +Node: List of Debugger Commands848348 +Node: Breakpoint Control849681 +Node: Debugger Execution Control853377 +Node: Viewing And Changing Data856741 +Node: Execution Stack860119 +Node: Debugger Info861756 +Node: Miscellaneous Debugger Commands865773 +Node: Readline Support870802 +Node: Limitations871694 +Node: Debugging Summary873808 +Node: Arbitrary Precision Arithmetic874976 +Node: Computer Arithmetic876392 +Ref: table-numeric-ranges879990 +Ref: Computer Arithmetic-Footnote-1880849 +Node: Math Definitions880906 +Ref: table-ieee-formats884194 +Ref: Math Definitions-Footnote-1884798 +Node: MPFR features884903 +Node: FP Math Caution886574 +Ref: FP Math Caution-Footnote-1887624 +Node: Inexactness of computations887993 +Node: Inexact representation888952 +Node: Comparing FP Values890309 +Node: Errors accumulate891391 +Node: Getting Accuracy892824 +Node: Try To Round895486 +Node: Setting precision896385 +Ref: table-predefined-precision-strings897069 +Node: Setting the rounding mode898858 +Ref: table-gawk-rounding-modes899222 +Ref: Setting the rounding mode-Footnote-1902677 +Node: Arbitrary Precision Integers902856 +Ref: Arbitrary Precision Integers-Footnote-1905842 +Node: POSIX Floating Point Problems905991 +Ref: POSIX Floating Point Problems-Footnote-1909864 +Node: Floating point summary909902 +Node: Dynamic Extensions912096 +Node: Extension Intro913648 +Node: Plugin License914914 +Node: Extension Mechanism Outline915711 +Ref: figure-load-extension916139 +Ref: figure-register-new-function917619 +Ref: figure-call-new-function918623 +Node: Extension API Description920609 +Node: Extension API Functions Introduction922059 +Node: General Data Types926883 +Ref: General Data Types-Footnote-1932622 +Node: Memory Allocation Functions932921 +Ref: Memory Allocation Functions-Footnote-1935760 +Node: Constructor Functions935856 +Node: Registration Functions937590 +Node: Extension Functions938275 +Node: Exit Callback Functions940572 +Node: Extension Version String941820 +Node: Input Parsers942485 +Node: Output Wrappers952364 +Node: Two-way processors956879 +Node: Printing Messages959083 +Ref: Printing Messages-Footnote-1960159 +Node: Updating `ERRNO'960311 +Node: Requesting Values961051 +Ref: table-value-types-returned961779 +Node: Accessing Parameters962736 +Node: Symbol Table Access963967 +Node: Symbol table by name964481 +Node: Symbol table by cookie966462 +Ref: Symbol table by cookie-Footnote-1970606 +Node: Cached values970669 +Ref: Cached values-Footnote-1974168 +Node: Array Manipulation974259 +Ref: Array Manipulation-Footnote-1975357 +Node: Array Data Types975394 +Ref: Array Data Types-Footnote-1978049 +Node: Array Functions978141 +Node: Flattening Arrays981995 +Node: Creating Arrays988887 +Node: Extension API Variables993658 +Node: Extension Versioning994294 +Node: Extension API Informational Variables996195 +Node: Extension API Boilerplate997260 +Node: Finding Extensions1001069 +Node: Extension Example1001629 +Node: Internal File Description1002401 +Node: Internal File Ops1006468 +Ref: Internal File Ops-Footnote-11018138 +Node: Using Internal File Ops1018278 +Ref: Using Internal File Ops-Footnote-11020661 +Node: Extension Samples1020934 +Node: Extension Sample File Functions1022460 +Node: Extension Sample Fnmatch1030098 +Node: Extension Sample Fork1031589 +Node: Extension Sample Inplace1032804 +Node: Extension Sample Ord1034479 +Node: Extension Sample Readdir1035315 +Ref: table-readdir-file-types1036191 +Node: Extension Sample Revout1037002 +Node: Extension Sample Rev2way1037592 +Node: Extension Sample Read write array1038332 +Node: Extension Sample Readfile1040272 +Node: Extension Sample Time1041367 +Node: Extension Sample API Tests1042716 +Node: gawkextlib1043207 +Node: Extension summary1045865 +Node: Extension Exercises1049554 +Node: Language History1050276 +Node: V7/SVR3.11051932 +Node: SVR41054113 +Node: POSIX1055558 +Node: BTL1056947 +Node: POSIX/GNU1057681 +Node: Feature History1063245 +Node: Common Extensions1076343 +Node: Ranges and Locales1077667 +Ref: Ranges and Locales-Footnote-11082285 +Ref: Ranges and Locales-Footnote-21082312 +Ref: Ranges and Locales-Footnote-31082546 +Node: Contributors1082767 +Node: History summary1088308 +Node: Installation1089678 +Node: Gawk Distribution1090624 +Node: Getting1091108 +Node: Extracting1091931 +Node: Distribution contents1093566 +Node: Unix Installation1099283 +Node: Quick Installation1099900 +Node: Additional Configuration Options1102324 +Node: Configuration Philosophy1104062 +Node: Non-Unix Installation1106431 +Node: PC Installation1106889 +Node: PC Binary Installation1108208 +Node: PC Compiling1110056 +Ref: PC Compiling-Footnote-11113077 +Node: PC Testing1113186 +Node: PC Using1114362 +Node: Cygwin1118477 +Node: MSYS1119300 +Node: VMS Installation1119800 +Node: VMS Compilation1120592 +Ref: VMS Compilation-Footnote-11121814 +Node: VMS Dynamic Extensions1121872 +Node: VMS Installation Details1123556 +Node: VMS Running1125808 +Node: VMS GNV1128644 +Node: VMS Old Gawk1129378 +Node: Bugs1129848 +Node: Other Versions1133731 +Node: Installation summary1140155 +Node: Notes1141211 +Node: Compatibility Mode1142076 +Node: Additions1142858 +Node: Accessing The Source1143783 +Node: Adding Code1145218 +Node: New Ports1151375 +Node: Derived Files1155857 +Ref: Derived Files-Footnote-11161332 +Ref: Derived Files-Footnote-21161366 +Ref: Derived Files-Footnote-31161962 +Node: Future Extensions1162076 +Node: Implementation Limitations1162682 +Node: Extension Design1163930 +Node: Old Extension Problems1165084 +Ref: Old Extension Problems-Footnote-11166601 +Node: Extension New Mechanism Goals1166658 +Ref: Extension New Mechanism Goals-Footnote-11170018 +Node: Extension Other Design Decisions1170207 +Node: Extension Future Growth1172315 +Node: Old Extension Mechanism1173151 +Node: Notes summary1174913 +Node: Basic Concepts1176099 +Node: Basic High Level1176780 +Ref: figure-general-flow1177052 +Ref: figure-process-flow1177651 +Ref: Basic High Level-Footnote-11180880 +Node: Basic Data Typing1181065 +Node: Glossary1184393 +Node: Copying1216322 +Node: GNU Free Documentation License1253878 +Node: Index1279014  End Tag Table -- cgit v1.2.3 From 5153d0f04b7ad460b23ae5a011061f7b93a122ef Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 27 Jan 2015 20:57:58 +0200 Subject: O'Reilly edits and other fixes. --- doc/gawk.info | 899 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 452 insertions(+), 447 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 80cca4be..6a107df5 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -11796,7 +11796,9 @@ internationalize and localize programs. Besides the built-in functions, `awk' has provisions for writing new functions that the rest of a program can use. The second half of this -major node describes these "user-defined" functions. +major node describes these "user-defined" functions. Finally, we +explore indirect function calls, a `gawk'-specific extension that lets +you determine at runtime what function is to be called. * Menu: @@ -11808,7 +11810,7 @@ major node describes these "user-defined" functions.  File: gawk.info, Node: Built-in, Next: User-defined, Up: Functions -9.1 Built-In Functions +9.1 Built-in Functions ====================== "Built-in" functions are always available for your `awk' program to @@ -11833,7 +11835,7 @@ for your convenience.  File: gawk.info, Node: Calling Built-in, Next: Numeric Functions, Up: Built-in -9.1.1 Calling Built-In Functions +9.1.1 Calling Built-in Functions -------------------------------- To call one of `awk''s built-in functions, write the name of the @@ -11870,9 +11872,10 @@ are evaluated from left to right or from right to left. For example: j = atan2(++i, i *= 2) If the order of evaluation is left to right, then `i' first becomes -6, and then 12, and `atan2()' is called with the two arguments 6 and -12. But if the order of evaluation is right to left, `i' first becomes -10, then 11, and `atan2()' is called with the two arguments 11 and 10. +six, and then 12, and `atan2()' is called with the two arguments six +and 12. But if the order of evaluation is right to left, `i' first +becomes 10, then 11, and `atan2()' is called with the two arguments 11 +and 10.  File: gawk.info, Node: Numeric Functions, Next: String Functions, Prev: Calling Built-in, Up: Built-in @@ -11913,7 +11916,7 @@ brackets ([ ]): Often random integers are needed instead. Following is a user-defined function that can be used to obtain a random - non-negative integer less than N: + nonnegative integer less than N: function randint(n) { @@ -12003,7 +12006,7 @@ File: gawk.info, Node: String Functions, Next: I/O Functions, Prev: Numeric F The functions in this minor node look at or change the text of one or more strings. - `gawk' understands locales (*note Locales::), and does all string + `gawk' understands locales (*note Locales::) and does all string processing in terms of _characters_, not _bytes_. This distinction is particularly important to understand for locales where one character may be represented by multiple bytes. Thus, for example, `length()' @@ -12074,7 +12077,7 @@ Options::): a[2] = "de" a[3] = "sac" - The `asorti()' function works similarly to `asort()', however, the + The `asorti()' function works similarly to `asort()'; however, the _indices_ are sorted, instead of the values. Thus, in the previous example, starting with the same initial set of indices and values in `a', calling `asorti(a)' would yield: @@ -12162,7 +12165,7 @@ Options::): With BWK `awk' and `gawk', it is a fatal error to use a regexp constant for FIND. Other implementations allow it, simply treating the regexp constant as an expression meaning `$0 ~ - /regexp/'. (d.c.). + /regexp/'. (d.c.) `length('[STRING]`)' Return the number of characters in STRING. If STRING is a number, @@ -12206,9 +12209,9 @@ Options::): `match(STRING, REGEXP' [`, ARRAY']`)' Search STRING for the longest, leftmost substring matched by the - regular expression, REGEXP and return the character position - (index) at which that substring begins (one, if it starts at the - beginning of STRING). If no match is found, return zero. + regular expression REGEXP and return the character position (index) + at which that substring begins (one, if it starts at the beginning + of STRING). If no match is found, return zero. The REGEXP argument may be either a regexp constant (`/'...`/') or a string constant (`"'...`"'). In the latter case, the string is @@ -12216,7 +12219,7 @@ Options::): discussion of the difference between the two forms, and the implications for writing your program correctly. - The order of the first two arguments is backwards from most other + The order of the first two arguments is the opposite of most other string functions that work with regular expressions, such as `sub()' and `gsub()'. It might help to remember that for `match()', the order is the same as for the `~' operator: `STRING @@ -12283,8 +12286,8 @@ Options::): There may not be subscripts for the start and index for every parenthesized subexpression, because they may not all have matched - text; thus they should be tested for with the `in' operator (*note - Reference to Elements::). + text; thus, they should be tested for with the `in' operator + (*note Reference to Elements::). The ARRAY argument to `match()' is a `gawk' extension. In compatibility mode (*note Options::), using a third argument is a @@ -12317,12 +12320,12 @@ Options::): FIELDSEP, is a regexp describing where to split STRING (much as `FS' can be a regexp describing where to split input records). If FIELDSEP is omitted, the value of `FS' is used. `split()' returns - the number of elements created. SEPS is a `gawk' extension with + the number of elements created. SEPS is a `gawk' extension, with `SEPS[I]' being the separator string between `ARRAY[I]' and - `ARRAY[I+1]'. If FIELDSEP is a single space then any leading + `ARRAY[I+1]'. If FIELDSEP is a single space, then any leading whitespace goes into `SEPS[0]' and any trailing whitespace goes - into `SEPS[N]' where N is the return value of `split()' (i.e., the - number of elements in ARRAY). + into `SEPS[N]', where N is the return value of `split()' (i.e., + the number of elements in ARRAY). The `split()' function splits strings into pieces in a manner similar to the way input lines are split into fields. For example: @@ -12346,17 +12349,18 @@ Options::): As with input field-splitting, when the value of FIELDSEP is `" "', leading and trailing whitespace is ignored in values assigned to the elements of ARRAY but not in SEPS, and the elements - are separated by runs of whitespace. Also, as with input - field-splitting, if FIELDSEP is the null string, each individual + are separated by runs of whitespace. Also, as with input field + splitting, if FIELDSEP is the null string, each individual character in the string is split into its own array element. (c.e.) Note, however, that `RS' has no effect on the way `split()' works. - Even though `RS = ""' causes newline to also be an input field - separator, this does not affect how `split()' splits strings. + Even though `RS = ""' causes the newline character to also be an + input field separator, this does not affect how `split()' splits + strings. Modern implementations of `awk', including `gawk', allow the third - argument to be a regexp constant (`/abc/') as well as a string. + argument to be a regexp constant (`/'...`/') as well as a string. (d.c.) The POSIX standard allows this as well. *Note Computed Regexps::, for a discussion of the difference between using a string constant or a regexp constant, and the implications for @@ -12457,7 +12461,7 @@ Options::): { sub(/\|/, "\\&"); print } As mentioned, the third argument to `sub()' must be a variable, - field or array element. Some versions of `awk' allow the third + field, or array element. Some versions of `awk' allow the third argument to be an expression that is not an lvalue. In such a case, `sub()' still searches for the pattern and returns zero or one, but the result of the substitution (if any) is thrown away @@ -12582,11 +12586,11 @@ example, `"a\qb"' is treated as `"aqb"'. At the runtime level, the various functions handle sequences of `\' and `&' differently. The situation is (sadly) somewhat complex. -Historically, the `sub()' and `gsub()' functions treated the two -character sequence `\&' specially; this sequence was replaced in the -generated text with a single `&'. Any other `\' within the REPLACEMENT -string that did not precede an `&' was passed through unchanged. This -is illustrated in *note table-sub-escapes::. +Historically, the `sub()' and `gsub()' functions treated the +two-character sequence `\&' specially; this sequence was replaced in +the generated text with a single `&'. Any other `\' within the +REPLACEMENT string that did not precede an `&' was passed through +unchanged. This is illustrated in *note table-sub-escapes::. You type `sub()' sees `sub()' generates ------- --------- -------------- @@ -12601,10 +12605,10 @@ is illustrated in *note table-sub-escapes::. Table 9.1: Historical escape sequence processing for `sub()' and `gsub()' -This table shows both the lexical-level processing, where an odd number -of backslashes becomes an even number at the runtime level, as well as -the runtime processing done by `sub()'. (For the sake of simplicity, -the rest of the following tables only show the case of even numbers of +This table shows the lexical-level processing, where an odd number of +backslashes becomes an even number at the runtime level, as well as the +runtime processing done by `sub()'. (For the sake of simplicity, the +rest of the following tables only show the case of even numbers of backslashes entered at the lexical level.) The problem with the historical approach is that there is no way to @@ -12628,10 +12632,10 @@ This is shown in *note table-sub-proposed::. `\\q' `\q' A literal `\q' `\\\\' `\\' `\\' -Table 9.2: GNU `awk' rules for `sub()' and backslash +Table 9.2: `gawk' rules for `sub()' and backslash In a nutshell, at the runtime level, there are now three special -sequences of characters (`\\\&', `\\&' and `\&') whereas historically +sequences of characters (`\\\&', `\\&', and `\&') whereas historically there was only one. However, as in the historical case, any `\' that is not part of one of these three sequences is not special and appears in the output literally. @@ -12661,7 +12665,7 @@ Table 9.3: POSIX rules for `sub()' and `gsub()' `\\\\' is seen as `\\' and produces `\' instead of `\\'. Starting with version 3.1.4, `gawk' followed the POSIX rules when -`--posix' is specified (*note Options::). Otherwise, it continued to +`--posix' was specified (*note Options::). Otherwise, it continued to follow the proposed rules, as that had been its behavior for many years. When version 4.0.0 was released, the `gawk' maintainer made the @@ -12688,9 +12692,9 @@ the `\' does not, as shown in *note table-gensub-escapes::. Table 9.4: Escape sequence processing for `gensub()' - Because of the complexity of the lexical and runtime level processing -and the special cases for `sub()' and `gsub()', we recommend the use of -`gawk' and `gensub()' when you have to do substitutions. + Because of the complexity of the lexical- and runtime-level +processing and the special cases for `sub()' and `gsub()', we recommend +the use of `gawk' and `gensub()' when you have to do substitutions. ---------- Footnotes ---------- @@ -12717,10 +12721,10 @@ parameters are enclosed in square brackets ([ ]): When closing a coprocess, it is occasionally useful to first close one end of the two-way pipe and then to close the other. This is done by providing a second argument to `close()'. This second - argument should be one of the two string values `"to"' or `"from"', - indicating which end of the pipe to close. Case in the string does - not matter. *Note Two-way I/O::, which discusses this feature in - more detail and gives an example. + argument (HOW) should be one of the two string values `"to"' or + `"from"', indicating which end of the pipe to close. Case in the + string does not matter. *Note Two-way I/O::, which discusses this + feature in more detail and gives an example. Note that the second argument to `close()' is a `gawk' extension; it is not available in compatibility mode (*note Options::). @@ -12738,7 +12742,7 @@ parameters are enclosed in square brackets ([ ]): sometimes it is necessary to force a program to "flush" its buffers (i.e., write the information to its destination, even if a buffer is not full). This is the purpose of the `fflush()' - function--`gawk' also buffers its output and the `fflush()' + function--`gawk' also buffers its output, and the `fflush()' function forces `gawk' to flush its buffers. Brian Kernighan added `fflush()' to his `awk' in April 1992. For @@ -12755,16 +12759,17 @@ parameters are enclosed in square brackets ([ ]): output files and pipes if the argument was the null string. This was changed in order to be compatible with Brian Kernighan's `awk', in the hope that standardizing this - feature in POSIX would then be easier (which indeed helped). + feature in POSIX would then be easier (which indeed proved to + be the case). With `gawk', you can use `fflush("/dev/stdout")' if you wish to flush only the standard output. `fflush()' returns zero if the buffer is successfully flushed; - otherwise, it returns non-zero. (`gawk' returns -1.) In the case - where all buffers are flushed, the return value is zero only if - all buffers were flushed successfully. Otherwise, it is -1, and - `gawk' warns about the problem FILENAME. + otherwise, it returns a nonzero value. (`gawk' returns -1.) In + the case where all buffers are flushed, the return value is zero + only if all buffers were flushed successfully. Otherwise, it is + -1, and `gawk' warns about the problem FILENAME. `gawk' also issues a warning message if you attempt to flush a file or pipe that was opened for reading (such as with `getline'), @@ -12773,9 +12778,9 @@ parameters are enclosed in square brackets ([ ]): Interactive Versus Noninteractive Buffering - As a side point, buffering issues can be even more confusing, - depending upon whether your program is "interactive" (i.e., - communicating with a user sitting at a keyboard).(1) + As a side point, buffering issues can be even more confusing if + your program is "interactive" (i.e., communicating with a user + sitting at a keyboard).(1) Interactive programs generally "line buffer" their output (i.e., they write out every line). Noninteractive programs wait until @@ -12804,7 +12809,7 @@ parameters are enclosed in square brackets ([ ]): shot. `system(COMMAND)' - Execute the operating-system command COMMAND and then return to + Execute the operating system command COMMAND and then return to the `awk' program. Return COMMAND's exit status. For example, if the following fragment of code is put in your `awk' @@ -12893,14 +12898,14 @@ File: gawk.info, Node: Time Functions, Next: Bitwise Functions, Prev: I/O Fun `awk' programs are commonly used to process log files containing timestamp information, indicating when a particular log record was -written. Many programs log their timestamp in the form returned by the -`time()' system call, which is the number of seconds since a particular -epoch. On POSIX-compliant systems, it is the number of seconds since -1970-01-01 00:00:00 UTC, not counting leap seconds.(1) All known -POSIX-compliant systems support timestamps from 0 through 2^31 - 1, -which is sufficient to represent times through 2038-01-19 03:14:07 UTC. -Many systems support a wider range of timestamps, including negative -timestamps that represent times before the epoch. +written. Many programs log their timestamps in the form returned by +the `time()' system call, which is the number of seconds since a +particular epoch. On POSIX-compliant systems, it is the number of +seconds since 1970-01-01 00:00:00 UTC, not counting leap seconds.(1) +All known POSIX-compliant systems support timestamps from 0 through +2^31 - 1, which is sufficient to represent times through 2038-01-19 +03:14:07 UTC. Many systems support a wider range of timestamps, +including negative timestamps that represent times before the epoch. In order to make it easier to process such log files and to produce useful reports, `gawk' provides the following functions for working @@ -12923,9 +12928,9 @@ enclosed in square brackets ([ ]): specified; for example, an hour of -1 means 1 hour before midnight. The origin-zero Gregorian calendar is assumed, with year 0 preceding year 1 and year -1 preceding year 0. The time is - assumed to be in the local timezone. If the daylight-savings flag - is positive, the time is assumed to be daylight savings time; if - zero, the time is assumed to be standard time; and if negative + assumed to be in the local time zone. If the daylight-savings + flag is positive, the time is assumed to be daylight savings time; + if zero, the time is assumed to be standard time; and if negative (the default), `mktime()' attempts to determine whether daylight savings time is in effect for the specified time. @@ -13066,23 +13071,23 @@ the following date format specifications: The weekday as a decimal number (1-7). Monday is day one. `%U' - The week number of the year (the first Sunday as the first day of - week one) as a decimal number (00-53). + The week number of the year (with the first Sunday as the first + day of week one) as a decimal number (00-53). `%V' - The week number of the year (the first Monday as the first day of - week one) as a decimal number (01-53). The method for determining - the week number is as specified by ISO 8601. (To wit: if the week - containing January 1 has four or more days in the new year, then - it is week one; otherwise it is week 53 of the previous year and - the next week is week one.) + The week number of the year (with the first Monday as the first + day of week one) as a decimal number (01-53). The method for + determining the week number is as specified by ISO 8601. (To wit: + if the week containing January 1 has four or more days in the new + year, then it is week one; otherwise it is week 53 of the previous + year and the next week is week one.) `%w' The weekday as a decimal number (0-6). Sunday is day zero. `%W' - The week number of the year (the first Monday as the first day of - week one) as a decimal number (00-53). + The week number of the year (with the first Monday as the first + day of week one) as a decimal number (00-53). `%x' The locale's "appropriate" date representation. (This is `%A %B @@ -13099,8 +13104,8 @@ the following date format specifications: The full year as a decimal number (e.g., 2015). `%z' - The timezone offset in a +HHMM format (e.g., the format necessary - to produce RFC 822/RFC 1036 date headers). + The time zone offset in a `+HHMM' format (e.g., the format + necessary to produce RFC 822/RFC 1036 date headers). `%Z' The time zone name or abbreviation; no characters if no time zone @@ -13217,7 +13222,7 @@ each successive pair of bits in the operands. Three common operations are bitwise AND, OR, and XOR. The operations are described in *note table-bitwise-ops::. - Bit Operator + Bit operator | AND | OR | XOR |--+--+--+--+--+-- Operands | 0 | 1 | 0 | 1 | 0 | 1 @@ -13273,7 +13278,7 @@ paragraph, don't worry about it.) Here is a user-defined function (*note User-defined::) that illustrates the use of these functions: - # bits2str --- turn a byte into readable 1's and 0's + # bits2str --- turn a byte into readable ones and zeros function bits2str(bits, data, mask) { @@ -13331,9 +13336,9 @@ Nondecimal-numbers::), and then demonstrates the results of the ---------- Footnotes ---------- - (1) This example shows that 0's come in on the left side. For + (1) This example shows that zeros come in on the left side. For `gawk', this is always true, but in some languages, it's possible to -have the left side fill with 1's. +have the left side fill with ones.  File: gawk.info, Node: Type Functions, Next: I18N Functions, Prev: Bitwise Functions, Up: Built-in @@ -31453,7 +31458,7 @@ Index * * (asterisk), * operator, as regexp operator: Regexp Operators. (line 89) * * (asterisk), * operator, null strings, matching: String Functions. - (line 536) + (line 537) * * (asterisk), ** operator <1>: Precedence. (line 49) * * (asterisk), ** operator: Arithmetic Ops. (line 81) * * (asterisk), **= operator <1>: Precedence. (line 95) @@ -31512,7 +31517,7 @@ Index * --re-interval option: Options. (line 281) * --sandbox option: Options. (line 288) * --sandbox option, disabling system() function: I/O Functions. - (line 128) + (line 129) * --sandbox option, input redirection with getline: Getline. (line 19) * --sandbox option, output redirection with print, printf: Redirection. (line 6) @@ -31814,7 +31819,7 @@ Index * asterisk (*), * operator, as regexp operator: Regexp Operators. (line 89) * asterisk (*), * operator, null strings, matching: String Functions. - (line 536) + (line 537) * asterisk (*), ** operator <1>: Precedence. (line 49) * asterisk (*), ** operator: Arithmetic Ops. (line 81) * asterisk (*), **= operator <1>: Precedence. (line 95) @@ -32021,7 +32026,7 @@ Index * Brennan, Michael: Foreword3. (line 84) * Brian Kernighan's awk <1>: I/O Functions. (line 43) * Brian Kernighan's awk <2>: Gory Details. (line 19) -* Brian Kernighan's awk <3>: String Functions. (line 492) +* Brian Kernighan's awk <3>: String Functions. (line 493) * Brian Kernighan's awk <4>: Delete. (line 51) * Brian Kernighan's awk <5>: Nextfile Statement. (line 47) * Brian Kernighan's awk <6>: Continue Statement. (line 44) @@ -32047,8 +32052,8 @@ Index * Buening, Andreas <2>: Contributors. (line 92) * Buening, Andreas: Acknowledgments. (line 60) * buffering, input/output <1>: Two-way I/O. (line 52) -* buffering, input/output: I/O Functions. (line 140) -* buffering, interactive vs. noninteractive: I/O Functions. (line 75) +* buffering, input/output: I/O Functions. (line 141) +* buffering, interactive vs. noninteractive: I/O Functions. (line 76) * buffers, flushing: I/O Functions. (line 32) * buffers, operators for: GNU Regexp Operators. (line 48) @@ -32074,7 +32079,7 @@ Index * case sensitivity, and regexps: User-modified. (line 76) * case sensitivity, and string comparisons: User-modified. (line 76) * case sensitivity, array indices and: Array Intro. (line 100) -* case sensitivity, converting case: String Functions. (line 522) +* case sensitivity, converting case: String Functions. (line 523) * case sensitivity, example programs: Library Functions. (line 53) * case sensitivity, gawk: Case-sensitivity. (line 26) * case sensitivity, regexps and: Case-sensitivity. (line 6) @@ -32203,9 +32208,9 @@ Index * control statements: Statements. (line 6) * controlling array scanning order: Controlling Scanning. (line 14) -* convert string to lower case: String Functions. (line 523) -* convert string to number: String Functions. (line 390) -* convert string to upper case: String Functions. (line 529) +* convert string to lower case: String Functions. (line 524) +* convert string to number: String Functions. (line 391) +* convert string to upper case: String Functions. (line 530) * converting integer array subscripts: Numeric Array Subscripts. (line 31) * converting, dates to timestamps: Time Functions. (line 76) @@ -32283,7 +32288,7 @@ Index (line 148) * dark corner, regexp constants, as arguments to user-defined functions: Using Constant Regexps. (line 43) -* dark corner, split() function: String Functions. (line 361) +* dark corner, split() function: String Functions. (line 362) * dark corner, strings, storing: gawk split records. (line 83) * dark corner, value of ARGV[0]: Auto-set. (line 39) * data, fixed-width: Constant Size. (line 6) @@ -32819,7 +32824,7 @@ Index * format time string: Time Functions. (line 48) * formats, numeric output: OFMT. (line 6) * formatting output: Printf. (line 6) -* formatting strings: String Functions. (line 383) +* formatting strings: String Functions. (line 384) * forward slash (/) to enclose regular expressions: Regexp. (line 10) * forward slash (/), / operator: Precedence. (line 55) * forward slash (/), /= operator <1>: Precedence. (line 95) @@ -33078,7 +33083,7 @@ Index * gsub <1>: String Functions. (line 140) * gsub: Using Constant Regexps. (line 43) -* gsub() function, arguments of: String Functions. (line 462) +* gsub() function, arguments of: String Functions. (line 463) * gsub() function, escape processing: Gory Details. (line 6) * h debugger command (alias for help): Miscellaneous Debugger Commands. (line 66) @@ -33181,7 +33186,7 @@ Index * integers, arbitrary precision: Arbitrary Precision Integers. (line 6) * integers, unsigned: Computer Arithmetic. (line 41) -* interacting with other programs: I/O Functions. (line 106) +* interacting with other programs: I/O Functions. (line 107) * internationalization <1>: I18N and L10N. (line 6) * internationalization: I18N Functions. (line 6) * internationalization, localization <1>: Internationalization. @@ -33202,7 +33207,7 @@ Index * interpreted programs: Basic High Level. (line 15) * interval expressions, regexp operator: Regexp Operators. (line 116) * inventory-shipped file: Sample Data Files. (line 32) -* invoke shell command: I/O Functions. (line 106) +* invoke shell command: I/O Functions. (line 107) * isarray: Type Functions. (line 11) * ISO: Glossary. (line 461) * ISO 8859-1: Glossary. (line 197) @@ -33362,7 +33367,7 @@ Index * matching, expressions, See comparison expressions: Typing and Comparison. (line 9) * matching, leftmost longest: Multiple Line. (line 26) -* matching, null strings: String Functions. (line 536) +* matching, null strings: String Functions. (line 537) * mawk utility <1>: Other Versions. (line 48) * mawk utility <2>: Nextfile Statement. (line 47) * mawk utility <3>: Concatenation. (line 36) @@ -33453,7 +33458,7 @@ Index (line 43) * null strings, converting numbers to strings: Strings And Numbers. (line 21) -* null strings, matching: String Functions. (line 536) +* null strings, matching: String Functions. (line 537) * number as string of bits: Bitwise Functions. (line 110) * number of array elements: String Functions. (line 201) * number sign (#), #! (executable scripts): Executable Scripts. @@ -33623,7 +33628,7 @@ Index * portability, operators: Increment Ops. (line 60) * portability, operators, not in POSIX awk: Precedence. (line 98) * portability, POSIXLY_CORRECT environment variable: Options. (line 361) -* portability, substr() function: String Functions. (line 512) +* portability, substr() function: String Functions. (line 513) * portable object files <1>: Translator i18n. (line 6) * portable object files: Explaining gettext. (line 37) * portable object files, converting to message object files: I18N Example. @@ -33872,7 +33877,7 @@ Index * regular expressions, searching for: Egrep Program. (line 6) * relational operators, See comparison operators: Typing and Comparison. (line 9) -* replace in string: String Functions. (line 408) +* replace in string: String Functions. (line 409) * return debugger command: Debugger Execution Control. (line 54) * return statement, user-defined functions: Return Statement. (line 6) @@ -34029,14 +34034,14 @@ Index (line 14) * sidebar, Changing NR and FNR: Auto-set. (line 312) * sidebar, Controlling Output Buffering with system(): I/O Functions. - (line 138) + (line 139) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. (line 134) * sidebar, FS and IGNORECASE: Field Splitting Summary. (line 38) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. - (line 73) -* sidebar, Matching the Null String: String Functions. (line 534) + (line 74) +* sidebar, Matching the Null String: String Functions. (line 535) * sidebar, Operator Evaluation Order: Increment Ops. (line 58) * sidebar, Piping into sh: Redirection. (line 134) * sidebar, Pre-POSIX awk Used OFMT for String Conversion: Strings And Numbers. @@ -34110,7 +34115,7 @@ Index * split utility: Split Program. (line 6) * split() function, array elements, deleting: Delete. (line 61) * split.awk program: Split Program. (line 30) -* sprintf <1>: String Functions. (line 383) +* sprintf <1>: String Functions. (line 384) * sprintf: OFMT. (line 15) * sprintf() function, OFMT variable and: User-modified. (line 114) * sprintf() function, print/printf statements and: Round Function. @@ -34156,7 +34161,7 @@ Index * strings splitting, example: String Functions. (line 335) * strings, converting <1>: Bitwise Functions. (line 110) * strings, converting: Strings And Numbers. (line 6) -* strings, converting letter case: String Functions. (line 522) +* strings, converting letter case: String Functions. (line 523) * strings, converting, numbers to: User-modified. (line 30) * strings, empty, See null strings: awk split records. (line 115) * strings, extracting: String Extraction. (line 6) @@ -34166,13 +34171,13 @@ Index * strings, null: Regexp Field Splitting. (line 43) * strings, numeric: Variable Typing. (line 6) -* strtonum: String Functions. (line 390) +* strtonum: String Functions. (line 391) * strtonum() function (gawk), --non-decimal-data option and: Nondecimal Data. (line 35) -* sub <1>: String Functions. (line 408) +* sub <1>: String Functions. (line 409) * sub: Using Constant Regexps. (line 43) -* sub() function, arguments of: String Functions. (line 462) +* sub() function, arguments of: String Functions. (line 463) * sub() function, escape processing: Gory Details. (line 6) * subscript separators: User-modified. (line 146) * subscripts in arrays, multidimensional: Multidimensional. (line 10) @@ -34186,15 +34191,15 @@ Index * SUBSEP variable, and multidimensional arrays: Multidimensional. (line 16) * substitute in string: String Functions. (line 90) -* substr: String Functions. (line 481) -* substring: String Functions. (line 481) +* substr: String Functions. (line 482) +* substring: String Functions. (line 482) * Sumner, Andrew: Other Versions. (line 68) * supplementary groups of gawk process: Auto-set. (line 237) * switch statement: Switch Statement. (line 6) * SYMTAB array: Auto-set. (line 269) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) -* system: I/O Functions. (line 106) +* system: I/O Functions. (line 107) * systime: Time Functions. (line 66) * t debugger command (alias for tbreak): Breakpoint Control. (line 90) * tbreak debugger command: Breakpoint Control. (line 90) @@ -34244,8 +34249,8 @@ Index * timestamps, converting dates to: Time Functions. (line 76) * timestamps, formatted: Getlocaltime Function. (line 6) -* tolower: String Functions. (line 523) -* toupper: String Functions. (line 529) +* tolower: String Functions. (line 524) +* toupper: String Functions. (line 530) * tr utility: Translate Program. (line 6) * trace debugger command: Miscellaneous Debugger Commands. (line 108) @@ -34264,14 +34269,14 @@ Index (line 22) * troubleshooting, fatal errors, printf format strings: Format Modifiers. (line 158) -* troubleshooting, fflush() function: I/O Functions. (line 62) +* troubleshooting, fflush() function: I/O Functions. (line 63) * troubleshooting, function call syntax: Function Calls. (line 30) * troubleshooting, gawk: Compatibility Mode. (line 6) * troubleshooting, gawk, bug reports: Bugs. (line 9) * troubleshooting, gawk, fatal errors, function arguments: Calling Built-in. (line 16) * troubleshooting, getline function: File Checking. (line 25) -* troubleshooting, gsub()/sub() functions: String Functions. (line 472) +* troubleshooting, gsub()/sub() functions: String Functions. (line 473) * troubleshooting, match() function: String Functions. (line 292) * troubleshooting, print statement, omitting commas: Print Examples. (line 31) @@ -34281,8 +34286,8 @@ Index * troubleshooting, regexp constants vs. string constants: Computed Regexps. (line 40) * troubleshooting, string concatenation: Concatenation. (line 26) -* troubleshooting, substr() function: String Functions. (line 499) -* troubleshooting, system() function: I/O Functions. (line 128) +* troubleshooting, substr() function: String Functions. (line 500) +* troubleshooting, system() function: I/O Functions. (line 129) * troubleshooting, typographical errors, global variables: Options. (line 98) * true, logical: Truth Values. (line 6) @@ -34686,334 +34691,334 @@ Node: Multiscanning490548 Node: Arrays of Arrays492137 Node: Arrays Summary496891 Node: Functions498982 -Node: Built-in499881 -Node: Calling Built-in500959 -Node: Numeric Functions502950 -Ref: Numeric Functions-Footnote-1506967 -Ref: Numeric Functions-Footnote-2507324 -Ref: Numeric Functions-Footnote-3507372 -Node: String Functions507644 -Ref: String Functions-Footnote-1531121 -Ref: String Functions-Footnote-2531250 -Ref: String Functions-Footnote-3531498 -Node: Gory Details531585 -Ref: table-sub-escapes533366 -Ref: table-sub-proposed534886 -Ref: table-posix-sub536250 -Ref: table-gensub-escapes537786 -Ref: Gory Details-Footnote-1538618 -Node: I/O Functions538769 -Ref: I/O Functions-Footnote-1545987 -Node: Time Functions546134 -Ref: Time Functions-Footnote-1556622 -Ref: Time Functions-Footnote-2556690 -Ref: Time Functions-Footnote-3556848 -Ref: Time Functions-Footnote-4556959 -Ref: Time Functions-Footnote-5557071 -Ref: Time Functions-Footnote-6557298 -Node: Bitwise Functions557564 -Ref: table-bitwise-ops558126 -Ref: Bitwise Functions-Footnote-1562435 -Node: Type Functions562604 -Node: I18N Functions563755 -Node: User-defined565400 -Node: Definition Syntax566205 -Ref: Definition Syntax-Footnote-1571612 -Node: Function Example571683 -Ref: Function Example-Footnote-1574602 -Node: Function Caveats574624 -Node: Calling A Function575142 -Node: Variable Scope576100 -Node: Pass By Value/Reference579088 -Node: Return Statement582583 -Node: Dynamic Typing585564 -Node: Indirect Calls586493 -Ref: Indirect Calls-Footnote-1597795 -Node: Functions Summary597923 -Node: Library Functions600625 -Ref: Library Functions-Footnote-1604234 -Ref: Library Functions-Footnote-2604377 -Node: Library Names604548 -Ref: Library Names-Footnote-1608002 -Ref: Library Names-Footnote-2608225 -Node: General Functions608311 -Node: Strtonum Function609414 -Node: Assert Function612436 -Node: Round Function615760 -Node: Cliff Random Function617301 -Node: Ordinal Functions618317 -Ref: Ordinal Functions-Footnote-1621380 -Ref: Ordinal Functions-Footnote-2621632 -Node: Join Function621843 -Ref: Join Function-Footnote-1623612 -Node: Getlocaltime Function623812 -Node: Readfile Function627556 -Node: Shell Quoting629526 -Node: Data File Management630927 -Node: Filetrans Function631559 -Node: Rewind Function635615 -Node: File Checking637002 -Ref: File Checking-Footnote-1638334 -Node: Empty Files638535 -Node: Ignoring Assigns640514 -Node: Getopt Function642065 -Ref: Getopt Function-Footnote-1653527 -Node: Passwd Functions653727 -Ref: Passwd Functions-Footnote-1662564 -Node: Group Functions662652 -Ref: Group Functions-Footnote-1670546 -Node: Walking Arrays670759 -Node: Library Functions Summary672362 -Node: Library Exercises673763 -Node: Sample Programs675043 -Node: Running Examples675813 -Node: Clones676541 -Node: Cut Program677765 -Node: Egrep Program687484 -Ref: Egrep Program-Footnote-1694982 -Node: Id Program695092 -Node: Split Program698737 -Ref: Split Program-Footnote-1702185 -Node: Tee Program702313 -Node: Uniq Program705102 -Node: Wc Program712521 -Ref: Wc Program-Footnote-1716771 -Node: Miscellaneous Programs716865 -Node: Dupword Program718078 -Node: Alarm Program720109 -Node: Translate Program724913 -Ref: Translate Program-Footnote-1729478 -Node: Labels Program729748 -Ref: Labels Program-Footnote-1733099 -Node: Word Sorting733183 -Node: History Sorting737254 -Node: Extract Program739090 -Node: Simple Sed746615 -Node: Igawk Program749683 -Ref: Igawk Program-Footnote-1764007 -Ref: Igawk Program-Footnote-2764208 -Ref: Igawk Program-Footnote-3764330 -Node: Anagram Program764445 -Node: Signature Program767502 -Node: Programs Summary768749 -Node: Programs Exercises769942 -Ref: Programs Exercises-Footnote-1774073 -Node: Advanced Features774164 -Node: Nondecimal Data776112 -Node: Array Sorting777702 -Node: Controlling Array Traversal778399 -Ref: Controlling Array Traversal-Footnote-1786732 -Node: Array Sorting Functions786850 -Ref: Array Sorting Functions-Footnote-1790739 -Node: Two-way I/O790935 -Ref: Two-way I/O-Footnote-1795880 -Ref: Two-way I/O-Footnote-2796066 -Node: TCP/IP Networking796148 -Node: Profiling799021 -Node: Advanced Features Summary806568 -Node: Internationalization808501 -Node: I18N and L10N809981 -Node: Explaining gettext810667 -Ref: Explaining gettext-Footnote-1815692 -Ref: Explaining gettext-Footnote-2815876 -Node: Programmer i18n816041 -Ref: Programmer i18n-Footnote-1820907 -Node: Translator i18n820956 -Node: String Extraction821750 -Ref: String Extraction-Footnote-1822881 -Node: Printf Ordering822967 -Ref: Printf Ordering-Footnote-1825753 -Node: I18N Portability825817 -Ref: I18N Portability-Footnote-1828272 -Node: I18N Example828335 -Ref: I18N Example-Footnote-1831138 -Node: Gawk I18N831210 -Node: I18N Summary831848 -Node: Debugger833187 -Node: Debugging834209 -Node: Debugging Concepts834650 -Node: Debugging Terms836503 -Node: Awk Debugging839075 -Node: Sample Debugging Session839969 -Node: Debugger Invocation840489 -Node: Finding The Bug841873 -Node: List of Debugger Commands848348 -Node: Breakpoint Control849681 -Node: Debugger Execution Control853377 -Node: Viewing And Changing Data856741 -Node: Execution Stack860119 -Node: Debugger Info861756 -Node: Miscellaneous Debugger Commands865773 -Node: Readline Support870802 -Node: Limitations871694 -Node: Debugging Summary873808 -Node: Arbitrary Precision Arithmetic874976 -Node: Computer Arithmetic876392 -Ref: table-numeric-ranges879990 -Ref: Computer Arithmetic-Footnote-1880849 -Node: Math Definitions880906 -Ref: table-ieee-formats884194 -Ref: Math Definitions-Footnote-1884798 -Node: MPFR features884903 -Node: FP Math Caution886574 -Ref: FP Math Caution-Footnote-1887624 -Node: Inexactness of computations887993 -Node: Inexact representation888952 -Node: Comparing FP Values890309 -Node: Errors accumulate891391 -Node: Getting Accuracy892824 -Node: Try To Round895486 -Node: Setting precision896385 -Ref: table-predefined-precision-strings897069 -Node: Setting the rounding mode898858 -Ref: table-gawk-rounding-modes899222 -Ref: Setting the rounding mode-Footnote-1902677 -Node: Arbitrary Precision Integers902856 -Ref: Arbitrary Precision Integers-Footnote-1905842 -Node: POSIX Floating Point Problems905991 -Ref: POSIX Floating Point Problems-Footnote-1909864 -Node: Floating point summary909902 -Node: Dynamic Extensions912096 -Node: Extension Intro913648 -Node: Plugin License914914 -Node: Extension Mechanism Outline915711 -Ref: figure-load-extension916139 -Ref: figure-register-new-function917619 -Ref: figure-call-new-function918623 -Node: Extension API Description920609 -Node: Extension API Functions Introduction922059 -Node: General Data Types926883 -Ref: General Data Types-Footnote-1932622 -Node: Memory Allocation Functions932921 -Ref: Memory Allocation Functions-Footnote-1935760 -Node: Constructor Functions935856 -Node: Registration Functions937590 -Node: Extension Functions938275 -Node: Exit Callback Functions940572 -Node: Extension Version String941820 -Node: Input Parsers942485 -Node: Output Wrappers952364 -Node: Two-way processors956879 -Node: Printing Messages959083 -Ref: Printing Messages-Footnote-1960159 -Node: Updating `ERRNO'960311 -Node: Requesting Values961051 -Ref: table-value-types-returned961779 -Node: Accessing Parameters962736 -Node: Symbol Table Access963967 -Node: Symbol table by name964481 -Node: Symbol table by cookie966462 -Ref: Symbol table by cookie-Footnote-1970606 -Node: Cached values970669 -Ref: Cached values-Footnote-1974168 -Node: Array Manipulation974259 -Ref: Array Manipulation-Footnote-1975357 -Node: Array Data Types975394 -Ref: Array Data Types-Footnote-1978049 -Node: Array Functions978141 -Node: Flattening Arrays981995 -Node: Creating Arrays988887 -Node: Extension API Variables993658 -Node: Extension Versioning994294 -Node: Extension API Informational Variables996195 -Node: Extension API Boilerplate997260 -Node: Finding Extensions1001069 -Node: Extension Example1001629 -Node: Internal File Description1002401 -Node: Internal File Ops1006468 -Ref: Internal File Ops-Footnote-11018138 -Node: Using Internal File Ops1018278 -Ref: Using Internal File Ops-Footnote-11020661 -Node: Extension Samples1020934 -Node: Extension Sample File Functions1022460 -Node: Extension Sample Fnmatch1030098 -Node: Extension Sample Fork1031589 -Node: Extension Sample Inplace1032804 -Node: Extension Sample Ord1034479 -Node: Extension Sample Readdir1035315 -Ref: table-readdir-file-types1036191 -Node: Extension Sample Revout1037002 -Node: Extension Sample Rev2way1037592 -Node: Extension Sample Read write array1038332 -Node: Extension Sample Readfile1040272 -Node: Extension Sample Time1041367 -Node: Extension Sample API Tests1042716 -Node: gawkextlib1043207 -Node: Extension summary1045865 -Node: Extension Exercises1049554 -Node: Language History1050276 -Node: V7/SVR3.11051932 -Node: SVR41054113 -Node: POSIX1055558 -Node: BTL1056947 -Node: POSIX/GNU1057681 -Node: Feature History1063245 -Node: Common Extensions1076343 -Node: Ranges and Locales1077667 -Ref: Ranges and Locales-Footnote-11082285 -Ref: Ranges and Locales-Footnote-21082312 -Ref: Ranges and Locales-Footnote-31082546 -Node: Contributors1082767 -Node: History summary1088308 -Node: Installation1089678 -Node: Gawk Distribution1090624 -Node: Getting1091108 -Node: Extracting1091931 -Node: Distribution contents1093566 -Node: Unix Installation1099283 -Node: Quick Installation1099900 -Node: Additional Configuration Options1102324 -Node: Configuration Philosophy1104062 -Node: Non-Unix Installation1106431 -Node: PC Installation1106889 -Node: PC Binary Installation1108208 -Node: PC Compiling1110056 -Ref: PC Compiling-Footnote-11113077 -Node: PC Testing1113186 -Node: PC Using1114362 -Node: Cygwin1118477 -Node: MSYS1119300 -Node: VMS Installation1119800 -Node: VMS Compilation1120592 -Ref: VMS Compilation-Footnote-11121814 -Node: VMS Dynamic Extensions1121872 -Node: VMS Installation Details1123556 -Node: VMS Running1125808 -Node: VMS GNV1128644 -Node: VMS Old Gawk1129378 -Node: Bugs1129848 -Node: Other Versions1133731 -Node: Installation summary1140155 -Node: Notes1141211 -Node: Compatibility Mode1142076 -Node: Additions1142858 -Node: Accessing The Source1143783 -Node: Adding Code1145218 -Node: New Ports1151375 -Node: Derived Files1155857 -Ref: Derived Files-Footnote-11161332 -Ref: Derived Files-Footnote-21161366 -Ref: Derived Files-Footnote-31161962 -Node: Future Extensions1162076 -Node: Implementation Limitations1162682 -Node: Extension Design1163930 -Node: Old Extension Problems1165084 -Ref: Old Extension Problems-Footnote-11166601 -Node: Extension New Mechanism Goals1166658 -Ref: Extension New Mechanism Goals-Footnote-11170018 -Node: Extension Other Design Decisions1170207 -Node: Extension Future Growth1172315 -Node: Old Extension Mechanism1173151 -Node: Notes summary1174913 -Node: Basic Concepts1176099 -Node: Basic High Level1176780 -Ref: figure-general-flow1177052 -Ref: figure-process-flow1177651 -Ref: Basic High Level-Footnote-11180880 -Node: Basic Data Typing1181065 -Node: Glossary1184393 -Node: Copying1216322 -Node: GNU Free Documentation License1253878 -Node: Index1279014 +Node: Built-in500021 +Node: Calling Built-in501099 +Node: Numeric Functions503094 +Ref: Numeric Functions-Footnote-1507110 +Ref: Numeric Functions-Footnote-2507467 +Ref: Numeric Functions-Footnote-3507515 +Node: String Functions507787 +Ref: String Functions-Footnote-1531288 +Ref: String Functions-Footnote-2531417 +Ref: String Functions-Footnote-3531665 +Node: Gory Details531752 +Ref: table-sub-escapes533533 +Ref: table-sub-proposed535048 +Ref: table-posix-sub536410 +Ref: table-gensub-escapes537947 +Ref: Gory Details-Footnote-1538780 +Node: I/O Functions538931 +Ref: I/O Functions-Footnote-1546167 +Node: Time Functions546314 +Ref: Time Functions-Footnote-1556823 +Ref: Time Functions-Footnote-2556891 +Ref: Time Functions-Footnote-3557049 +Ref: Time Functions-Footnote-4557160 +Ref: Time Functions-Footnote-5557272 +Ref: Time Functions-Footnote-6557499 +Node: Bitwise Functions557765 +Ref: table-bitwise-ops558327 +Ref: Bitwise Functions-Footnote-1562639 +Node: Type Functions562811 +Node: I18N Functions563962 +Node: User-defined565607 +Node: Definition Syntax566412 +Ref: Definition Syntax-Footnote-1571819 +Node: Function Example571890 +Ref: Function Example-Footnote-1574809 +Node: Function Caveats574831 +Node: Calling A Function575349 +Node: Variable Scope576307 +Node: Pass By Value/Reference579295 +Node: Return Statement582790 +Node: Dynamic Typing585771 +Node: Indirect Calls586700 +Ref: Indirect Calls-Footnote-1598002 +Node: Functions Summary598130 +Node: Library Functions600832 +Ref: Library Functions-Footnote-1604441 +Ref: Library Functions-Footnote-2604584 +Node: Library Names604755 +Ref: Library Names-Footnote-1608209 +Ref: Library Names-Footnote-2608432 +Node: General Functions608518 +Node: Strtonum Function609621 +Node: Assert Function612643 +Node: Round Function615967 +Node: Cliff Random Function617508 +Node: Ordinal Functions618524 +Ref: Ordinal Functions-Footnote-1621587 +Ref: Ordinal Functions-Footnote-2621839 +Node: Join Function622050 +Ref: Join Function-Footnote-1623819 +Node: Getlocaltime Function624019 +Node: Readfile Function627763 +Node: Shell Quoting629733 +Node: Data File Management631134 +Node: Filetrans Function631766 +Node: Rewind Function635822 +Node: File Checking637209 +Ref: File Checking-Footnote-1638541 +Node: Empty Files638742 +Node: Ignoring Assigns640721 +Node: Getopt Function642272 +Ref: Getopt Function-Footnote-1653734 +Node: Passwd Functions653934 +Ref: Passwd Functions-Footnote-1662771 +Node: Group Functions662859 +Ref: Group Functions-Footnote-1670753 +Node: Walking Arrays670966 +Node: Library Functions Summary672569 +Node: Library Exercises673970 +Node: Sample Programs675250 +Node: Running Examples676020 +Node: Clones676748 +Node: Cut Program677972 +Node: Egrep Program687691 +Ref: Egrep Program-Footnote-1695189 +Node: Id Program695299 +Node: Split Program698944 +Ref: Split Program-Footnote-1702392 +Node: Tee Program702520 +Node: Uniq Program705309 +Node: Wc Program712728 +Ref: Wc Program-Footnote-1716978 +Node: Miscellaneous Programs717072 +Node: Dupword Program718285 +Node: Alarm Program720316 +Node: Translate Program725120 +Ref: Translate Program-Footnote-1729685 +Node: Labels Program729955 +Ref: Labels Program-Footnote-1733306 +Node: Word Sorting733390 +Node: History Sorting737461 +Node: Extract Program739297 +Node: Simple Sed746822 +Node: Igawk Program749890 +Ref: Igawk Program-Footnote-1764214 +Ref: Igawk Program-Footnote-2764415 +Ref: Igawk Program-Footnote-3764537 +Node: Anagram Program764652 +Node: Signature Program767709 +Node: Programs Summary768956 +Node: Programs Exercises770149 +Ref: Programs Exercises-Footnote-1774280 +Node: Advanced Features774371 +Node: Nondecimal Data776319 +Node: Array Sorting777909 +Node: Controlling Array Traversal778606 +Ref: Controlling Array Traversal-Footnote-1786939 +Node: Array Sorting Functions787057 +Ref: Array Sorting Functions-Footnote-1790946 +Node: Two-way I/O791142 +Ref: Two-way I/O-Footnote-1796087 +Ref: Two-way I/O-Footnote-2796273 +Node: TCP/IP Networking796355 +Node: Profiling799228 +Node: Advanced Features Summary806775 +Node: Internationalization808708 +Node: I18N and L10N810188 +Node: Explaining gettext810874 +Ref: Explaining gettext-Footnote-1815899 +Ref: Explaining gettext-Footnote-2816083 +Node: Programmer i18n816248 +Ref: Programmer i18n-Footnote-1821114 +Node: Translator i18n821163 +Node: String Extraction821957 +Ref: String Extraction-Footnote-1823088 +Node: Printf Ordering823174 +Ref: Printf Ordering-Footnote-1825960 +Node: I18N Portability826024 +Ref: I18N Portability-Footnote-1828479 +Node: I18N Example828542 +Ref: I18N Example-Footnote-1831345 +Node: Gawk I18N831417 +Node: I18N Summary832055 +Node: Debugger833394 +Node: Debugging834416 +Node: Debugging Concepts834857 +Node: Debugging Terms836710 +Node: Awk Debugging839282 +Node: Sample Debugging Session840176 +Node: Debugger Invocation840696 +Node: Finding The Bug842080 +Node: List of Debugger Commands848555 +Node: Breakpoint Control849888 +Node: Debugger Execution Control853584 +Node: Viewing And Changing Data856948 +Node: Execution Stack860326 +Node: Debugger Info861963 +Node: Miscellaneous Debugger Commands865980 +Node: Readline Support871009 +Node: Limitations871901 +Node: Debugging Summary874015 +Node: Arbitrary Precision Arithmetic875183 +Node: Computer Arithmetic876599 +Ref: table-numeric-ranges880197 +Ref: Computer Arithmetic-Footnote-1881056 +Node: Math Definitions881113 +Ref: table-ieee-formats884401 +Ref: Math Definitions-Footnote-1885005 +Node: MPFR features885110 +Node: FP Math Caution886781 +Ref: FP Math Caution-Footnote-1887831 +Node: Inexactness of computations888200 +Node: Inexact representation889159 +Node: Comparing FP Values890516 +Node: Errors accumulate891598 +Node: Getting Accuracy893031 +Node: Try To Round895693 +Node: Setting precision896592 +Ref: table-predefined-precision-strings897276 +Node: Setting the rounding mode899065 +Ref: table-gawk-rounding-modes899429 +Ref: Setting the rounding mode-Footnote-1902884 +Node: Arbitrary Precision Integers903063 +Ref: Arbitrary Precision Integers-Footnote-1906049 +Node: POSIX Floating Point Problems906198 +Ref: POSIX Floating Point Problems-Footnote-1910071 +Node: Floating point summary910109 +Node: Dynamic Extensions912303 +Node: Extension Intro913855 +Node: Plugin License915121 +Node: Extension Mechanism Outline915918 +Ref: figure-load-extension916346 +Ref: figure-register-new-function917826 +Ref: figure-call-new-function918830 +Node: Extension API Description920816 +Node: Extension API Functions Introduction922266 +Node: General Data Types927090 +Ref: General Data Types-Footnote-1932829 +Node: Memory Allocation Functions933128 +Ref: Memory Allocation Functions-Footnote-1935967 +Node: Constructor Functions936063 +Node: Registration Functions937797 +Node: Extension Functions938482 +Node: Exit Callback Functions940779 +Node: Extension Version String942027 +Node: Input Parsers942692 +Node: Output Wrappers952571 +Node: Two-way processors957086 +Node: Printing Messages959290 +Ref: Printing Messages-Footnote-1960366 +Node: Updating `ERRNO'960518 +Node: Requesting Values961258 +Ref: table-value-types-returned961986 +Node: Accessing Parameters962943 +Node: Symbol Table Access964174 +Node: Symbol table by name964688 +Node: Symbol table by cookie966669 +Ref: Symbol table by cookie-Footnote-1970813 +Node: Cached values970876 +Ref: Cached values-Footnote-1974375 +Node: Array Manipulation974466 +Ref: Array Manipulation-Footnote-1975564 +Node: Array Data Types975601 +Ref: Array Data Types-Footnote-1978256 +Node: Array Functions978348 +Node: Flattening Arrays982202 +Node: Creating Arrays989094 +Node: Extension API Variables993865 +Node: Extension Versioning994501 +Node: Extension API Informational Variables996402 +Node: Extension API Boilerplate997467 +Node: Finding Extensions1001276 +Node: Extension Example1001836 +Node: Internal File Description1002608 +Node: Internal File Ops1006675 +Ref: Internal File Ops-Footnote-11018345 +Node: Using Internal File Ops1018485 +Ref: Using Internal File Ops-Footnote-11020868 +Node: Extension Samples1021141 +Node: Extension Sample File Functions1022667 +Node: Extension Sample Fnmatch1030305 +Node: Extension Sample Fork1031796 +Node: Extension Sample Inplace1033011 +Node: Extension Sample Ord1034686 +Node: Extension Sample Readdir1035522 +Ref: table-readdir-file-types1036398 +Node: Extension Sample Revout1037209 +Node: Extension Sample Rev2way1037799 +Node: Extension Sample Read write array1038539 +Node: Extension Sample Readfile1040479 +Node: Extension Sample Time1041574 +Node: Extension Sample API Tests1042923 +Node: gawkextlib1043414 +Node: Extension summary1046072 +Node: Extension Exercises1049761 +Node: Language History1050483 +Node: V7/SVR3.11052139 +Node: SVR41054320 +Node: POSIX1055765 +Node: BTL1057154 +Node: POSIX/GNU1057888 +Node: Feature History1063452 +Node: Common Extensions1076550 +Node: Ranges and Locales1077874 +Ref: Ranges and Locales-Footnote-11082492 +Ref: Ranges and Locales-Footnote-21082519 +Ref: Ranges and Locales-Footnote-31082753 +Node: Contributors1082974 +Node: History summary1088515 +Node: Installation1089885 +Node: Gawk Distribution1090831 +Node: Getting1091315 +Node: Extracting1092138 +Node: Distribution contents1093773 +Node: Unix Installation1099490 +Node: Quick Installation1100107 +Node: Additional Configuration Options1102531 +Node: Configuration Philosophy1104269 +Node: Non-Unix Installation1106638 +Node: PC Installation1107096 +Node: PC Binary Installation1108415 +Node: PC Compiling1110263 +Ref: PC Compiling-Footnote-11113284 +Node: PC Testing1113393 +Node: PC Using1114569 +Node: Cygwin1118684 +Node: MSYS1119507 +Node: VMS Installation1120007 +Node: VMS Compilation1120799 +Ref: VMS Compilation-Footnote-11122021 +Node: VMS Dynamic Extensions1122079 +Node: VMS Installation Details1123763 +Node: VMS Running1126015 +Node: VMS GNV1128851 +Node: VMS Old Gawk1129585 +Node: Bugs1130055 +Node: Other Versions1133938 +Node: Installation summary1140362 +Node: Notes1141418 +Node: Compatibility Mode1142283 +Node: Additions1143065 +Node: Accessing The Source1143990 +Node: Adding Code1145425 +Node: New Ports1151582 +Node: Derived Files1156064 +Ref: Derived Files-Footnote-11161539 +Ref: Derived Files-Footnote-21161573 +Ref: Derived Files-Footnote-31162169 +Node: Future Extensions1162283 +Node: Implementation Limitations1162889 +Node: Extension Design1164137 +Node: Old Extension Problems1165291 +Ref: Old Extension Problems-Footnote-11166808 +Node: Extension New Mechanism Goals1166865 +Ref: Extension New Mechanism Goals-Footnote-11170225 +Node: Extension Other Design Decisions1170414 +Node: Extension Future Growth1172522 +Node: Old Extension Mechanism1173358 +Node: Notes summary1175120 +Node: Basic Concepts1176306 +Node: Basic High Level1176987 +Ref: figure-general-flow1177259 +Ref: figure-process-flow1177858 +Ref: Basic High Level-Footnote-11181087 +Node: Basic Data Typing1181272 +Node: Glossary1184600 +Node: Copying1216529 +Node: GNU Free Documentation License1254085 +Node: Index1279221  End Tag Table -- cgit v1.2.3 From 1bd1b885c7dd16b5e4ab78c040312f6f7d742784 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 30 Jan 2015 10:06:16 +0200 Subject: Disallow calling a function parameter. Check params are not function names. --- doc/gawk.info | 632 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 317 insertions(+), 315 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 6a107df5..4e975b14 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -13459,11 +13459,13 @@ the argument names are used to hold the argument values given in the call. A function cannot have two parameters with the same name, nor may it -have a parameter with the same name as the function itself. In -addition, according to the POSIX standard, function parameters cannot -have the same name as one of the special predefined variables (*note -Built-in Variables::). Not all versions of `awk' enforce this -restriction. +have a parameter with the same name as the function itself. + + CAUTION: According to the POSIX standard, function parameters + cannot have the same name as one of the special predefined + variables (*note Built-in Variables::), nor may a function + parameter have the same name as another function. Not all + versions of `awk' enforce these restrictions. Local variables act like the empty string if referenced where a string value is required, and like zero if referenced where a numeric @@ -14065,13 +14067,13 @@ using indirect function calls: # average --- return the average of the values in fields $first - $last - function average(first, last, sum, i) + function average(first, last, the_sum, i) { - sum = 0; + the_sum = 0; for (i = first; i <= last; i++) - sum += $i + the_sum += $i - return sum / (last - first + 1) + return the_sum / (last - first + 1) } # sum --- return the sum of the values in fields $first - $last @@ -32157,7 +32159,7 @@ Index * common extensions, \x escape sequence: Escape Sequences. (line 61) * common extensions, BINMODE variable: PC Using. (line 33) * common extensions, delete to delete entire arrays: Delete. (line 39) -* common extensions, func keyword: Definition Syntax. (line 93) +* common extensions, func keyword: Definition Syntax. (line 95) * common extensions, length() applied to an array: String Functions. (line 201) * common extensions, RS as a regexp: gawk split records. (line 6) @@ -32678,7 +32680,7 @@ Index * extensions, common, BINMODE variable: PC Using. (line 33) * extensions, common, delete to delete entire arrays: Delete. (line 39) * extensions, common, fflush() function: I/O Functions. (line 43) -* extensions, common, func keyword: Definition Syntax. (line 93) +* extensions, common, func keyword: Definition Syntax. (line 95) * extensions, common, length() applied to an array: String Functions. (line 201) * extensions, common, RS as a regexp: gawk split records. (line 6) @@ -32895,7 +32897,7 @@ Index * functions, library, user database, reading: Passwd Functions. (line 6) * functions, names of: Definition Syntax. (line 23) -* functions, recursive: Definition Syntax. (line 83) +* functions, recursive: Definition Syntax. (line 85) * functions, string-translation: I18N Functions. (line 6) * functions, undefined: Pass By Value/Reference. (line 68) @@ -33616,7 +33618,7 @@ Index (line 65) * portability, deleting array elements: Delete. (line 56) * portability, example programs: Library Functions. (line 42) -* portability, functions, defining: Definition Syntax. (line 109) +* portability, functions, defining: Definition Syntax. (line 111) * portability, gawk: New Ports. (line 6) * portability, gettext library and: Explaining gettext. (line 11) * portability, internationalization and: I18N Portability. (line 6) @@ -33661,7 +33663,7 @@ Index * POSIX awk, field separators and <1>: Full Line Fields. (line 16) * POSIX awk, field separators and: Fields. (line 6) * POSIX awk, FS variable and: User-modified. (line 60) -* POSIX awk, function keyword in: Definition Syntax. (line 93) +* POSIX awk, function keyword in: Definition Syntax. (line 95) * POSIX awk, functions and, gsub()/sub(): Gory Details. (line 90) * POSIX awk, functions and, length(): String Functions. (line 180) * POSIX awk, GNU long options and: Options. (line 15) @@ -33754,7 +33756,7 @@ Index * programming conventions, functions, calling: Calling Built-in. (line 10) * programming conventions, functions, writing: Definition Syntax. - (line 65) + (line 67) * programming conventions, gawk extensions: Internal File Ops. (line 45) * programming conventions, private variable names: Library Names. @@ -33823,7 +33825,7 @@ Index * records, splitting input into: Records. (line 6) * records, terminating: awk split records. (line 125) * records, treating files as: gawk split records. (line 93) -* recursive functions: Definition Syntax. (line 83) +* recursive functions: Definition Syntax. (line 85) * redirect gawk output, in debugger: Debugger Info. (line 72) * redirection of input: Getline/File. (line 6) * redirection of output: Redirection. (line 6) @@ -33992,7 +33994,7 @@ Index * set directory of message catalogs: I18N Functions. (line 12) * set watchpoint: Viewing And Changing Data. (line 67) -* shadowing of variable values: Definition Syntax. (line 71) +* shadowing of variable values: Definition Syntax. (line 73) * shell quoting, rules for: Quoting. (line 6) * shells, piping commands into: Redirection. (line 136) * shells, quoting: Using Shell Variables. @@ -34366,7 +34368,7 @@ Index * variables, predefined conveying information: Auto-set. (line 6) * variables, private: Library Names. (line 11) * variables, setting: Options. (line 32) -* variables, shadowing: Definition Syntax. (line 71) +* variables, shadowing: Definition Syntax. (line 73) * variables, types of: Assignment Ops. (line 40) * variables, types of, comparison expressions and: Typing and Comparison. (line 9) @@ -34723,302 +34725,302 @@ Node: Type Functions562811 Node: I18N Functions563962 Node: User-defined565607 Node: Definition Syntax566412 -Ref: Definition Syntax-Footnote-1571819 -Node: Function Example571890 -Ref: Function Example-Footnote-1574809 -Node: Function Caveats574831 -Node: Calling A Function575349 -Node: Variable Scope576307 -Node: Pass By Value/Reference579295 -Node: Return Statement582790 -Node: Dynamic Typing585771 -Node: Indirect Calls586700 -Ref: Indirect Calls-Footnote-1598002 -Node: Functions Summary598130 -Node: Library Functions600832 -Ref: Library Functions-Footnote-1604441 -Ref: Library Functions-Footnote-2604584 -Node: Library Names604755 -Ref: Library Names-Footnote-1608209 -Ref: Library Names-Footnote-2608432 -Node: General Functions608518 -Node: Strtonum Function609621 -Node: Assert Function612643 -Node: Round Function615967 -Node: Cliff Random Function617508 -Node: Ordinal Functions618524 -Ref: Ordinal Functions-Footnote-1621587 -Ref: Ordinal Functions-Footnote-2621839 -Node: Join Function622050 -Ref: Join Function-Footnote-1623819 -Node: Getlocaltime Function624019 -Node: Readfile Function627763 -Node: Shell Quoting629733 -Node: Data File Management631134 -Node: Filetrans Function631766 -Node: Rewind Function635822 -Node: File Checking637209 -Ref: File Checking-Footnote-1638541 -Node: Empty Files638742 -Node: Ignoring Assigns640721 -Node: Getopt Function642272 -Ref: Getopt Function-Footnote-1653734 -Node: Passwd Functions653934 -Ref: Passwd Functions-Footnote-1662771 -Node: Group Functions662859 -Ref: Group Functions-Footnote-1670753 -Node: Walking Arrays670966 -Node: Library Functions Summary672569 -Node: Library Exercises673970 -Node: Sample Programs675250 -Node: Running Examples676020 -Node: Clones676748 -Node: Cut Program677972 -Node: Egrep Program687691 -Ref: Egrep Program-Footnote-1695189 -Node: Id Program695299 -Node: Split Program698944 -Ref: Split Program-Footnote-1702392 -Node: Tee Program702520 -Node: Uniq Program705309 -Node: Wc Program712728 -Ref: Wc Program-Footnote-1716978 -Node: Miscellaneous Programs717072 -Node: Dupword Program718285 -Node: Alarm Program720316 -Node: Translate Program725120 -Ref: Translate Program-Footnote-1729685 -Node: Labels Program729955 -Ref: Labels Program-Footnote-1733306 -Node: Word Sorting733390 -Node: History Sorting737461 -Node: Extract Program739297 -Node: Simple Sed746822 -Node: Igawk Program749890 -Ref: Igawk Program-Footnote-1764214 -Ref: Igawk Program-Footnote-2764415 -Ref: Igawk Program-Footnote-3764537 -Node: Anagram Program764652 -Node: Signature Program767709 -Node: Programs Summary768956 -Node: Programs Exercises770149 -Ref: Programs Exercises-Footnote-1774280 -Node: Advanced Features774371 -Node: Nondecimal Data776319 -Node: Array Sorting777909 -Node: Controlling Array Traversal778606 -Ref: Controlling Array Traversal-Footnote-1786939 -Node: Array Sorting Functions787057 -Ref: Array Sorting Functions-Footnote-1790946 -Node: Two-way I/O791142 -Ref: Two-way I/O-Footnote-1796087 -Ref: Two-way I/O-Footnote-2796273 -Node: TCP/IP Networking796355 -Node: Profiling799228 -Node: Advanced Features Summary806775 -Node: Internationalization808708 -Node: I18N and L10N810188 -Node: Explaining gettext810874 -Ref: Explaining gettext-Footnote-1815899 -Ref: Explaining gettext-Footnote-2816083 -Node: Programmer i18n816248 -Ref: Programmer i18n-Footnote-1821114 -Node: Translator i18n821163 -Node: String Extraction821957 -Ref: String Extraction-Footnote-1823088 -Node: Printf Ordering823174 -Ref: Printf Ordering-Footnote-1825960 -Node: I18N Portability826024 -Ref: I18N Portability-Footnote-1828479 -Node: I18N Example828542 -Ref: I18N Example-Footnote-1831345 -Node: Gawk I18N831417 -Node: I18N Summary832055 -Node: Debugger833394 -Node: Debugging834416 -Node: Debugging Concepts834857 -Node: Debugging Terms836710 -Node: Awk Debugging839282 -Node: Sample Debugging Session840176 -Node: Debugger Invocation840696 -Node: Finding The Bug842080 -Node: List of Debugger Commands848555 -Node: Breakpoint Control849888 -Node: Debugger Execution Control853584 -Node: Viewing And Changing Data856948 -Node: Execution Stack860326 -Node: Debugger Info861963 -Node: Miscellaneous Debugger Commands865980 -Node: Readline Support871009 -Node: Limitations871901 -Node: Debugging Summary874015 -Node: Arbitrary Precision Arithmetic875183 -Node: Computer Arithmetic876599 -Ref: table-numeric-ranges880197 -Ref: Computer Arithmetic-Footnote-1881056 -Node: Math Definitions881113 -Ref: table-ieee-formats884401 -Ref: Math Definitions-Footnote-1885005 -Node: MPFR features885110 -Node: FP Math Caution886781 -Ref: FP Math Caution-Footnote-1887831 -Node: Inexactness of computations888200 -Node: Inexact representation889159 -Node: Comparing FP Values890516 -Node: Errors accumulate891598 -Node: Getting Accuracy893031 -Node: Try To Round895693 -Node: Setting precision896592 -Ref: table-predefined-precision-strings897276 -Node: Setting the rounding mode899065 -Ref: table-gawk-rounding-modes899429 -Ref: Setting the rounding mode-Footnote-1902884 -Node: Arbitrary Precision Integers903063 -Ref: Arbitrary Precision Integers-Footnote-1906049 -Node: POSIX Floating Point Problems906198 -Ref: POSIX Floating Point Problems-Footnote-1910071 -Node: Floating point summary910109 -Node: Dynamic Extensions912303 -Node: Extension Intro913855 -Node: Plugin License915121 -Node: Extension Mechanism Outline915918 -Ref: figure-load-extension916346 -Ref: figure-register-new-function917826 -Ref: figure-call-new-function918830 -Node: Extension API Description920816 -Node: Extension API Functions Introduction922266 -Node: General Data Types927090 -Ref: General Data Types-Footnote-1932829 -Node: Memory Allocation Functions933128 -Ref: Memory Allocation Functions-Footnote-1935967 -Node: Constructor Functions936063 -Node: Registration Functions937797 -Node: Extension Functions938482 -Node: Exit Callback Functions940779 -Node: Extension Version String942027 -Node: Input Parsers942692 -Node: Output Wrappers952571 -Node: Two-way processors957086 -Node: Printing Messages959290 -Ref: Printing Messages-Footnote-1960366 -Node: Updating `ERRNO'960518 -Node: Requesting Values961258 -Ref: table-value-types-returned961986 -Node: Accessing Parameters962943 -Node: Symbol Table Access964174 -Node: Symbol table by name964688 -Node: Symbol table by cookie966669 -Ref: Symbol table by cookie-Footnote-1970813 -Node: Cached values970876 -Ref: Cached values-Footnote-1974375 -Node: Array Manipulation974466 -Ref: Array Manipulation-Footnote-1975564 -Node: Array Data Types975601 -Ref: Array Data Types-Footnote-1978256 -Node: Array Functions978348 -Node: Flattening Arrays982202 -Node: Creating Arrays989094 -Node: Extension API Variables993865 -Node: Extension Versioning994501 -Node: Extension API Informational Variables996402 -Node: Extension API Boilerplate997467 -Node: Finding Extensions1001276 -Node: Extension Example1001836 -Node: Internal File Description1002608 -Node: Internal File Ops1006675 -Ref: Internal File Ops-Footnote-11018345 -Node: Using Internal File Ops1018485 -Ref: Using Internal File Ops-Footnote-11020868 -Node: Extension Samples1021141 -Node: Extension Sample File Functions1022667 -Node: Extension Sample Fnmatch1030305 -Node: Extension Sample Fork1031796 -Node: Extension Sample Inplace1033011 -Node: Extension Sample Ord1034686 -Node: Extension Sample Readdir1035522 -Ref: table-readdir-file-types1036398 -Node: Extension Sample Revout1037209 -Node: Extension Sample Rev2way1037799 -Node: Extension Sample Read write array1038539 -Node: Extension Sample Readfile1040479 -Node: Extension Sample Time1041574 -Node: Extension Sample API Tests1042923 -Node: gawkextlib1043414 -Node: Extension summary1046072 -Node: Extension Exercises1049761 -Node: Language History1050483 -Node: V7/SVR3.11052139 -Node: SVR41054320 -Node: POSIX1055765 -Node: BTL1057154 -Node: POSIX/GNU1057888 -Node: Feature History1063452 -Node: Common Extensions1076550 -Node: Ranges and Locales1077874 -Ref: Ranges and Locales-Footnote-11082492 -Ref: Ranges and Locales-Footnote-21082519 -Ref: Ranges and Locales-Footnote-31082753 -Node: Contributors1082974 -Node: History summary1088515 -Node: Installation1089885 -Node: Gawk Distribution1090831 -Node: Getting1091315 -Node: Extracting1092138 -Node: Distribution contents1093773 -Node: Unix Installation1099490 -Node: Quick Installation1100107 -Node: Additional Configuration Options1102531 -Node: Configuration Philosophy1104269 -Node: Non-Unix Installation1106638 -Node: PC Installation1107096 -Node: PC Binary Installation1108415 -Node: PC Compiling1110263 -Ref: PC Compiling-Footnote-11113284 -Node: PC Testing1113393 -Node: PC Using1114569 -Node: Cygwin1118684 -Node: MSYS1119507 -Node: VMS Installation1120007 -Node: VMS Compilation1120799 -Ref: VMS Compilation-Footnote-11122021 -Node: VMS Dynamic Extensions1122079 -Node: VMS Installation Details1123763 -Node: VMS Running1126015 -Node: VMS GNV1128851 -Node: VMS Old Gawk1129585 -Node: Bugs1130055 -Node: Other Versions1133938 -Node: Installation summary1140362 -Node: Notes1141418 -Node: Compatibility Mode1142283 -Node: Additions1143065 -Node: Accessing The Source1143990 -Node: Adding Code1145425 -Node: New Ports1151582 -Node: Derived Files1156064 -Ref: Derived Files-Footnote-11161539 -Ref: Derived Files-Footnote-21161573 -Ref: Derived Files-Footnote-31162169 -Node: Future Extensions1162283 -Node: Implementation Limitations1162889 -Node: Extension Design1164137 -Node: Old Extension Problems1165291 -Ref: Old Extension Problems-Footnote-11166808 -Node: Extension New Mechanism Goals1166865 -Ref: Extension New Mechanism Goals-Footnote-11170225 -Node: Extension Other Design Decisions1170414 -Node: Extension Future Growth1172522 -Node: Old Extension Mechanism1173358 -Node: Notes summary1175120 -Node: Basic Concepts1176306 -Node: Basic High Level1176987 -Ref: figure-general-flow1177259 -Ref: figure-process-flow1177858 -Ref: Basic High Level-Footnote-11181087 -Node: Basic Data Typing1181272 -Node: Glossary1184600 -Node: Copying1216529 -Node: GNU Free Documentation License1254085 -Node: Index1279221 +Ref: Definition Syntax-Footnote-1571911 +Node: Function Example571982 +Ref: Function Example-Footnote-1574901 +Node: Function Caveats574923 +Node: Calling A Function575441 +Node: Variable Scope576399 +Node: Pass By Value/Reference579387 +Node: Return Statement582882 +Node: Dynamic Typing585863 +Node: Indirect Calls586792 +Ref: Indirect Calls-Footnote-1598110 +Node: Functions Summary598238 +Node: Library Functions600940 +Ref: Library Functions-Footnote-1604549 +Ref: Library Functions-Footnote-2604692 +Node: Library Names604863 +Ref: Library Names-Footnote-1608317 +Ref: Library Names-Footnote-2608540 +Node: General Functions608626 +Node: Strtonum Function609729 +Node: Assert Function612751 +Node: Round Function616075 +Node: Cliff Random Function617616 +Node: Ordinal Functions618632 +Ref: Ordinal Functions-Footnote-1621695 +Ref: Ordinal Functions-Footnote-2621947 +Node: Join Function622158 +Ref: Join Function-Footnote-1623927 +Node: Getlocaltime Function624127 +Node: Readfile Function627871 +Node: Shell Quoting629841 +Node: Data File Management631242 +Node: Filetrans Function631874 +Node: Rewind Function635930 +Node: File Checking637317 +Ref: File Checking-Footnote-1638649 +Node: Empty Files638850 +Node: Ignoring Assigns640829 +Node: Getopt Function642380 +Ref: Getopt Function-Footnote-1653842 +Node: Passwd Functions654042 +Ref: Passwd Functions-Footnote-1662879 +Node: Group Functions662967 +Ref: Group Functions-Footnote-1670861 +Node: Walking Arrays671074 +Node: Library Functions Summary672677 +Node: Library Exercises674078 +Node: Sample Programs675358 +Node: Running Examples676128 +Node: Clones676856 +Node: Cut Program678080 +Node: Egrep Program687799 +Ref: Egrep Program-Footnote-1695297 +Node: Id Program695407 +Node: Split Program699052 +Ref: Split Program-Footnote-1702500 +Node: Tee Program702628 +Node: Uniq Program705417 +Node: Wc Program712836 +Ref: Wc Program-Footnote-1717086 +Node: Miscellaneous Programs717180 +Node: Dupword Program718393 +Node: Alarm Program720424 +Node: Translate Program725228 +Ref: Translate Program-Footnote-1729793 +Node: Labels Program730063 +Ref: Labels Program-Footnote-1733414 +Node: Word Sorting733498 +Node: History Sorting737569 +Node: Extract Program739405 +Node: Simple Sed746930 +Node: Igawk Program749998 +Ref: Igawk Program-Footnote-1764322 +Ref: Igawk Program-Footnote-2764523 +Ref: Igawk Program-Footnote-3764645 +Node: Anagram Program764760 +Node: Signature Program767817 +Node: Programs Summary769064 +Node: Programs Exercises770257 +Ref: Programs Exercises-Footnote-1774388 +Node: Advanced Features774479 +Node: Nondecimal Data776427 +Node: Array Sorting778017 +Node: Controlling Array Traversal778714 +Ref: Controlling Array Traversal-Footnote-1787047 +Node: Array Sorting Functions787165 +Ref: Array Sorting Functions-Footnote-1791054 +Node: Two-way I/O791250 +Ref: Two-way I/O-Footnote-1796195 +Ref: Two-way I/O-Footnote-2796381 +Node: TCP/IP Networking796463 +Node: Profiling799336 +Node: Advanced Features Summary806883 +Node: Internationalization808816 +Node: I18N and L10N810296 +Node: Explaining gettext810982 +Ref: Explaining gettext-Footnote-1816007 +Ref: Explaining gettext-Footnote-2816191 +Node: Programmer i18n816356 +Ref: Programmer i18n-Footnote-1821222 +Node: Translator i18n821271 +Node: String Extraction822065 +Ref: String Extraction-Footnote-1823196 +Node: Printf Ordering823282 +Ref: Printf Ordering-Footnote-1826068 +Node: I18N Portability826132 +Ref: I18N Portability-Footnote-1828587 +Node: I18N Example828650 +Ref: I18N Example-Footnote-1831453 +Node: Gawk I18N831525 +Node: I18N Summary832163 +Node: Debugger833502 +Node: Debugging834524 +Node: Debugging Concepts834965 +Node: Debugging Terms836818 +Node: Awk Debugging839390 +Node: Sample Debugging Session840284 +Node: Debugger Invocation840804 +Node: Finding The Bug842188 +Node: List of Debugger Commands848663 +Node: Breakpoint Control849996 +Node: Debugger Execution Control853692 +Node: Viewing And Changing Data857056 +Node: Execution Stack860434 +Node: Debugger Info862071 +Node: Miscellaneous Debugger Commands866088 +Node: Readline Support871117 +Node: Limitations872009 +Node: Debugging Summary874123 +Node: Arbitrary Precision Arithmetic875291 +Node: Computer Arithmetic876707 +Ref: table-numeric-ranges880305 +Ref: Computer Arithmetic-Footnote-1881164 +Node: Math Definitions881221 +Ref: table-ieee-formats884509 +Ref: Math Definitions-Footnote-1885113 +Node: MPFR features885218 +Node: FP Math Caution886889 +Ref: FP Math Caution-Footnote-1887939 +Node: Inexactness of computations888308 +Node: Inexact representation889267 +Node: Comparing FP Values890624 +Node: Errors accumulate891706 +Node: Getting Accuracy893139 +Node: Try To Round895801 +Node: Setting precision896700 +Ref: table-predefined-precision-strings897384 +Node: Setting the rounding mode899173 +Ref: table-gawk-rounding-modes899537 +Ref: Setting the rounding mode-Footnote-1902992 +Node: Arbitrary Precision Integers903171 +Ref: Arbitrary Precision Integers-Footnote-1906157 +Node: POSIX Floating Point Problems906306 +Ref: POSIX Floating Point Problems-Footnote-1910179 +Node: Floating point summary910217 +Node: Dynamic Extensions912411 +Node: Extension Intro913963 +Node: Plugin License915229 +Node: Extension Mechanism Outline916026 +Ref: figure-load-extension916454 +Ref: figure-register-new-function917934 +Ref: figure-call-new-function918938 +Node: Extension API Description920924 +Node: Extension API Functions Introduction922374 +Node: General Data Types927198 +Ref: General Data Types-Footnote-1932937 +Node: Memory Allocation Functions933236 +Ref: Memory Allocation Functions-Footnote-1936075 +Node: Constructor Functions936171 +Node: Registration Functions937905 +Node: Extension Functions938590 +Node: Exit Callback Functions940887 +Node: Extension Version String942135 +Node: Input Parsers942800 +Node: Output Wrappers952679 +Node: Two-way processors957194 +Node: Printing Messages959398 +Ref: Printing Messages-Footnote-1960474 +Node: Updating `ERRNO'960626 +Node: Requesting Values961366 +Ref: table-value-types-returned962094 +Node: Accessing Parameters963051 +Node: Symbol Table Access964282 +Node: Symbol table by name964796 +Node: Symbol table by cookie966777 +Ref: Symbol table by cookie-Footnote-1970921 +Node: Cached values970984 +Ref: Cached values-Footnote-1974483 +Node: Array Manipulation974574 +Ref: Array Manipulation-Footnote-1975672 +Node: Array Data Types975709 +Ref: Array Data Types-Footnote-1978364 +Node: Array Functions978456 +Node: Flattening Arrays982310 +Node: Creating Arrays989202 +Node: Extension API Variables993973 +Node: Extension Versioning994609 +Node: Extension API Informational Variables996510 +Node: Extension API Boilerplate997575 +Node: Finding Extensions1001384 +Node: Extension Example1001944 +Node: Internal File Description1002716 +Node: Internal File Ops1006783 +Ref: Internal File Ops-Footnote-11018453 +Node: Using Internal File Ops1018593 +Ref: Using Internal File Ops-Footnote-11020976 +Node: Extension Samples1021249 +Node: Extension Sample File Functions1022775 +Node: Extension Sample Fnmatch1030413 +Node: Extension Sample Fork1031904 +Node: Extension Sample Inplace1033119 +Node: Extension Sample Ord1034794 +Node: Extension Sample Readdir1035630 +Ref: table-readdir-file-types1036506 +Node: Extension Sample Revout1037317 +Node: Extension Sample Rev2way1037907 +Node: Extension Sample Read write array1038647 +Node: Extension Sample Readfile1040587 +Node: Extension Sample Time1041682 +Node: Extension Sample API Tests1043031 +Node: gawkextlib1043522 +Node: Extension summary1046180 +Node: Extension Exercises1049869 +Node: Language History1050591 +Node: V7/SVR3.11052247 +Node: SVR41054428 +Node: POSIX1055873 +Node: BTL1057262 +Node: POSIX/GNU1057996 +Node: Feature History1063560 +Node: Common Extensions1076658 +Node: Ranges and Locales1077982 +Ref: Ranges and Locales-Footnote-11082600 +Ref: Ranges and Locales-Footnote-21082627 +Ref: Ranges and Locales-Footnote-31082861 +Node: Contributors1083082 +Node: History summary1088623 +Node: Installation1089993 +Node: Gawk Distribution1090939 +Node: Getting1091423 +Node: Extracting1092246 +Node: Distribution contents1093881 +Node: Unix Installation1099598 +Node: Quick Installation1100215 +Node: Additional Configuration Options1102639 +Node: Configuration Philosophy1104377 +Node: Non-Unix Installation1106746 +Node: PC Installation1107204 +Node: PC Binary Installation1108523 +Node: PC Compiling1110371 +Ref: PC Compiling-Footnote-11113392 +Node: PC Testing1113501 +Node: PC Using1114677 +Node: Cygwin1118792 +Node: MSYS1119615 +Node: VMS Installation1120115 +Node: VMS Compilation1120907 +Ref: VMS Compilation-Footnote-11122129 +Node: VMS Dynamic Extensions1122187 +Node: VMS Installation Details1123871 +Node: VMS Running1126123 +Node: VMS GNV1128959 +Node: VMS Old Gawk1129693 +Node: Bugs1130163 +Node: Other Versions1134046 +Node: Installation summary1140470 +Node: Notes1141526 +Node: Compatibility Mode1142391 +Node: Additions1143173 +Node: Accessing The Source1144098 +Node: Adding Code1145533 +Node: New Ports1151690 +Node: Derived Files1156172 +Ref: Derived Files-Footnote-11161647 +Ref: Derived Files-Footnote-21161681 +Ref: Derived Files-Footnote-31162277 +Node: Future Extensions1162391 +Node: Implementation Limitations1162997 +Node: Extension Design1164245 +Node: Old Extension Problems1165399 +Ref: Old Extension Problems-Footnote-11166916 +Node: Extension New Mechanism Goals1166973 +Ref: Extension New Mechanism Goals-Footnote-11170333 +Node: Extension Other Design Decisions1170522 +Node: Extension Future Growth1172630 +Node: Old Extension Mechanism1173466 +Node: Notes summary1175228 +Node: Basic Concepts1176414 +Node: Basic High Level1177095 +Ref: figure-general-flow1177367 +Ref: figure-process-flow1177966 +Ref: Basic High Level-Footnote-11181195 +Node: Basic Data Typing1181380 +Node: Glossary1184708 +Node: Copying1216637 +Node: GNU Free Documentation License1254193 +Node: Index1279329  End Tag Table -- cgit v1.2.3