diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-04-24 22:40:05 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-04-24 22:40:05 +0300 |
commit | 96a6de7b58212096aac4307e8c798fd9c18d5aca (patch) | |
tree | fe103bd7815cb93ccfc48cce5c955c60e80d42e0 /doc | |
parent | 1dadadf117db7822ace6e92002b42681e88ff8c8 (diff) | |
download | egawk-96a6de7b58212096aac4307e8c798fd9c18d5aca.tar.gz egawk-96a6de7b58212096aac4307e8c798fd9c18d5aca.tar.bz2 egawk-96a6de7b58212096aac4307e8c798fd9c18d5aca.zip |
Just about done with doc cleanup.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 6 | ||||
-rw-r--r-- | doc/awkcard.in | 3 | ||||
-rw-r--r-- | doc/gawk.1 | 317 | ||||
-rw-r--r-- | doc/gawk.info | 887 | ||||
-rw-r--r-- | doc/gawk.texi | 26 | ||||
-rw-r--r-- | doc/gawkman.texi | 26 |
6 files changed, 648 insertions, 617 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 61aab3fc..805dd2ee 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2013-04-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1: Finish cleanup pass. + * awkcard.in: Document that getline sets RT. + * gawkman.texi: Ditto. + 2013-04-23 Arnold D. Robbins <arnold@skeeve.com> * gawk.1: Start cleanup pass. diff --git a/doc/awkcard.in b/doc/awkcard.in index 90969886..95de42b8 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1327,7 +1327,8 @@ of input data, execute any \*(FCEND\fP rule(s). .sp .5 .fi \*(FCgetline\*(FR returns 1 on success, 0 on end of file, and \-1 on an error. -\*(CBUpon an error, \*(FCERRNO\*(FR contains a string describing +\*(CBAll versions set \*(FCRT\fP. +Upon an error, \*(FCERRNO\*(FR contains a string describing the problem.\*(CX .EB "\s+2\f(HBINPUT CONTROL\*(FR\s0" .sp .6 @@ -13,7 +13,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Apr 23 2012" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Apr 24 2013" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -42,7 +42,7 @@ This version in turn is based on the description in by Aho, Kernighan, and Weinberger. .I Gawk provides the additional features found in the current version -of \*(UX +of Brian Kernighan's .I awk and a number of \*(GN-specific extensions. .PP @@ -181,7 +181,7 @@ Run in .I compatibility mode. In compatibility mode, .I gawk -behaves identically to \*(UX +behaves identically to Brian Kernighan's .IR awk ; none of the \*(GN-specific extensions are recognized. .\" The use of @@ -989,7 +989,7 @@ or extension functions in the program. .BR NOTE : You may not use the .B delete -statment with the +statement with the .B FUNCTAB array. .TP @@ -1308,7 +1308,7 @@ function may be used to test if an element in is an array. You may not use the .B delete -statment with the +statement with the .B SYMTAB array. .TP @@ -1387,6 +1387,18 @@ a[2][2] = 7 .fi .ft .RE +.PP +.BR NOTE : +You may need to tell +.I gawk +that an array element is really a subarray in order to use it where +.I gawk +expects an array (such as in the second argument to +.BR split() ). +You can do this by creating an element in the subarray and then +deleting it with the +.B delete +statement. .SS Variable Typing And Conversion .PP Variables and fields @@ -1398,6 +1410,9 @@ it will be treated as a string. To force a variable to be treated as a number, add 0 to it; to force it to be treated as a string, concatenate it with the null string. .PP +Uninitialized variables have the numeric value 0 and the string value "" +(the null, or empty, string). +.PP When a string must be converted to a number, the conversion is accomplished using .IR strtod (3). @@ -1428,7 +1443,7 @@ has a string value of \fB"12"\fR and not \fB"12.00"\fR. .BR NOTE : When operating in POSIX mode (such as with the .B \-\^\-posix -command line option), +option), beware that locale settings may interfere with the way decimal numbers are treated: the decimal separator of the numbers you are feeding to @@ -1465,9 +1480,6 @@ The basic idea is that .IR "user input" , and only user input, that looks numeric, should be treated that way. -.PP -Uninitialized variables have the numeric value 0 and the string value "" -(the null, or empty, string). .SS Octal and Hexadecimal Constants You may use C-style octal and hexadecimal constants in your AWK program source code. @@ -1493,22 +1505,22 @@ A literal backslash. The \*(lqalert\*(rq character; usually the \s-1ASCII\s+1 \s-1BEL\s+1 character. .TP .B \eb -backspace. +Backspace. .TP .B \ef -form-feed. +Form-feed. .TP .B \en -newline. +Newline. .TP .B \er -carriage return. +Carriage return. .TP .B \et -horizontal tab. +Horizontal tab. .TP .B \ev -vertical tab. +Vertical tab. .TP .BI \ex "\^hex digits" The character represented by the string of hexadecimal digits following @@ -1639,7 +1651,7 @@ Inside the .B BEGINFILE rule, the value of .B ERRNO -will be the empty string if the file could be opened successfully. +will be the empty string if the file was opened successfully. Otherwise, there is some problem with the file and the code should use .B nextfile @@ -1691,58 +1703,59 @@ Regular expressions are the extended kind found in They are composed of characters as follows: .TP "\w'\fB[^\fIabc.\|.\|.\fB]\fR'u+2n" .I c -matches the non-metacharacter +Matches the non-metacharacter .IR c . .TP .I \ec -matches the literal character +Matches the literal character .IR c . .TP .B . -matches any character +Matches any character .I including newline. .TP .B ^ -matches the beginning of a string. +Matches the beginning of a string. .TP .B $ -matches the end of a string. +Matches the end of a string. .TP .BI [ abc.\|.\|. ] -character list, matches any of the characters +A character list: matches any of the characters .IR abc.\|.\|. . +You may include a range of characters by separating them with a dash. .TP \fB[^\fIabc.\|.\|.\fB]\fR -negated character list, matches any character except +A negated character list: matches any character except .IR abc.\|.\|. . .TP .IB r1 | r2 -alternation: matches either +Alternation: matches either .I r1 or .IR r2 . .TP .I r1r2 -concatenation: matches +Concatenation: matches .IR r1 , and then .IR r2 . .TP .IB r\^ + -matches one or more +Matches one or more .IR r\^ "'s." .TP .IB r * -matches zero or more +Matches zero or more .IR r\^ "'s." .TP .IB r\^ ? -matches zero or one +Matches zero or one .IR r\^ "'s." .TP .BI ( r ) -grouping: matches +Grouping: matches .IR r . .TP .PD 0 @@ -1773,37 +1786,38 @@ is repeated at least times. .TP .B \ey -matches the empty string at either the beginning or the +Matches the empty string at either the beginning or the end of a word. .TP .B \eB -matches the empty string within a word. +Matches the empty string within a word. .TP .B \e< -matches the empty string at the beginning of a word. +Matches the empty string at the beginning of a word. .TP .B \e> -matches the empty string at the end of a word. +Matches the empty string at the end of a word. .TP .B \es -matches any whitespace character. +Matches any whitespace character. .TP .B \eS -matches any nonwhitespace character. +Matches any nonwhitespace character. .TP .B \ew -matches any word-constituent character (letter, digit, or underscore). +Matches any word-constituent character (letter, digit, or underscore). .TP .B \eW -matches any character that is not word-constituent. +Matches any character that is not word-constituent. .TP .B \e` -matches the empty string at the beginning of a buffer (string). +Matches the empty string at the beginning of a buffer (string). .TP .B \e' -matches the empty string at the end of a buffer. +Matches the empty string at the end of a buffer. .PP -The escape sequences that are valid in string constants (see below) +The escape sequences that are valid in string constants (see +.BR "String Constants" ) are also valid in regular expressions. .PP .I "Character classes" @@ -1952,7 +1966,7 @@ interprets characters in regular expressions. No options In the default case, .I gawk -provide all the facilities of +provides all the facilities of \*(PX regular expressions and the \*(GN regular expression operators described above. .TP .B \-\^\-posix @@ -1985,7 +1999,7 @@ and input/output statements available are patterned after those in C. .SS Operators .PP -The operators in \*(AK, in order of decreasing precedence, are +The operators in \*(AK, in order of decreasing precedence, are: .PP .TP "\w'\fB*= /= %= ^=\fR'u+1n" .BR ( \&.\|.\|. ) @@ -2037,7 +2051,7 @@ Only use one on the right-hand side. The expression has the same meaning as \fB(($0 ~ /foo/) ~ \fIexp\fB)\fR. This is usually .I not -what was intended. +what you want. .TP .B in Array membership. @@ -2113,7 +2127,8 @@ Set from next input record; set .BR NF , .BR NR , -.BR FNR . +.BR FNR , +.BR RT . .TP .BI "getline <" file Set @@ -2121,20 +2136,23 @@ Set from next record of .IR file ; set -.BR NF . +.BR NF , +.BR RT . .TP .BI getline " var" Set .I var from next input record; set .BR NR , -.BR FNR . +.BR FNR , +.BR RT . .TP .BI getline " var" " <" file Set .I var from next record of -.IR file . +.IR file , +.BR RT . .TP \fIcommand\fB | getline \fR[\fIvar\fR] Run @@ -2143,7 +2161,8 @@ piping the output either into .B $0 or .IR var , -as above. +as above, and +.BR RT . .TP \fIcommand\fB |& getline \fR[\fIvar\fR] Run @@ -2153,7 +2172,8 @@ piping the output either into .B $0 or .IR var , -as above. +as above, and +.BR RT . Co-processes are a .I gawk extension. @@ -2165,9 +2185,12 @@ below.) .B next Stop processing the current input record. The next input record is read and processing starts over with the first pattern in the -\*(AK program. If the end of the input data is reached, the +\*(AK program. +Upon reaching the end of the input data, +.I gawk +executes any .B END -rule(s), if any, are executed. +rule(s). .TP .B "nextfile" Stop processing the current input file. The next input record read @@ -2178,33 +2201,32 @@ and are updated, .B FNR is reset to 1, and processing starts over with the first pattern in the -\*(AK program. If the end of the input data is reached, the +\*(AK program. +Upon reaching the end of the input data, +.I gawk +executes any .B END -rule(s), if any, are executed. +rule(s). .TP .B print Print the current record. -The output record is terminated with the value of the -.B ORS -variable. +The output record is terminated with the value of +.BR ORS . .TP .BI print " expr-list" Print expressions. -Each expression is separated by the value of the -.B OFS -variable. -The output record is terminated with the value of the -.B ORS -variable. +Each expression is separated by the value of +.BR OFS . +The output record is terminated with the value of +.BR ORS . .TP .BI print " expr-list" " >" file Print expressions on .IR file . -Each expression is separated by the value of the -.B OFS -variable. The output record is terminated with the value of the -.B ORS -variable. +Each expression is separated by the value of +.BR OFS . +The output record is terminated with the value of +.BR ORS . .TP .BI printf " fmt, expr-list" Format and print. @@ -2252,10 +2274,10 @@ The command returns 1 on success, 0 on end of file, and \-1 on an error. Upon an error, .B ERRNO -contains a string describing the problem. +is set to a string describing the problem. .PP .BR NOTE : -Failure in opening a two-way socket will result in a non-fatal error being +Failure in opening a two-way socket results in a non-fatal error being returned to the calling function. If using a pipe, co-process, or socket to .BR getline , or from @@ -2292,7 +2314,7 @@ A decimal number (the integer part). .TP .BR %e , " %E" A floating point number of the form -.BR [\-]d.dddddde[+\^\-]dd . +[\fB\-\fP]\fId\fB.\fIdddddd\^\fBe\fR[\fB+\-\fR]\fIdd\fR. The .B %E format uses @@ -2302,7 +2324,7 @@ instead of .TP .BR %f , " %F" A floating point number of the form -.BR [\-]ddd.dddddd . +[\fB\-\fP]\fIddd\fB.\fIdddddd\fR. If the system library supports it, .B %F is available as well. This is like @@ -2423,9 +2445,9 @@ value to be printed. .TP .I width The field should be padded to this width. The field is normally padded -with spaces. If the +with spaces. With the .B 0 -flag has been used, it is padded with zeroes. +flag, it is padded with zeroes. .TP .BI \&. prec A number that specifies the precision to use when printing. @@ -2466,9 +2488,9 @@ routines are supported. A .B * in place of either the -.B width +.I width or -.B prec +.I prec specifications causes their values to be taken from the argument list to .B printf @@ -2499,6 +2521,9 @@ parent process (usually the shell). These file names may also be used on the command line to name data files. The filenames are: .TP "\w'\fB/dev/stdout\fR'u+1n" +.B \- +The standard input. +.TP .B /dev/stdin The standard input. .TP @@ -2605,7 +2630,8 @@ Return the sine of which is in radians. .TP .BI sqrt( expr ) -The square root function. +Return the square root of +.IR expr . .TP \&\fBsrand(\fR[\fIexpr\^\fR]\fB)\fR Use @@ -2613,7 +2639,7 @@ Use as the new seed for the random number generator. If no .I expr is provided, use the time of day. -The return value is the previous seed for the random +Return the previous seed for the random number generator. .SS String Functions .PP @@ -2638,7 +2664,7 @@ with sequential integers starting with 1. If the optional destination array .I d -is specified, then +is specified, first duplicate .I s into @@ -2834,11 +2860,11 @@ Element values are the portions of that matched .IR r . The value of -.I seps[i] +.BI seps[ i ] is the separator that appeared in front of -.IR a[i+1] . -If +.BI a[ i +1]\fR. +\&\fRIf .I r is omitted, .B FPAT @@ -2871,33 +2897,33 @@ The arrays and .I seps are cleared first. -.I seps[i] +.BI seps[ i ] is the field separator matched by .I r between -.I a[i] +.BI a[ i ] and -.IR a[i+1] . -If +.BI a[ i +1]\fR. +\&\fRIf .I r is a single space, then leading whitespace in .I s goes into the extra array element -.I seps[0] +.B seps[0] and trailing whitespace goes into the extra array element -.IR seps[n] , +.BI seps[ n ]\fR, where .I n is the return value of -.IR "split(s, a, r, seps)" . +.BI split( s ", " a ", " r ", " seps )\fR. Splitting behaves identically to field splitting, described above. .TP .BI sprintf( fmt , " expr-list" ) -Prints +Print .I expr-list according to .IR fmt , -and returns the resulting string. +and return the resulting string. .TP .BI strtonum( str ) Examine @@ -2908,10 +2934,8 @@ If begins with a leading .BR 0 , -.B strtonum() -assumes that -.I str -is an octal number. +treat it +as an octal number. If .I str begins @@ -2919,11 +2943,9 @@ with a leading .B 0x or .BR 0X , -.B strtonum() -assumes that -.I str -is a hexadecimal number. -Otherwise, decimal is assumed. +treat it +as a hexadecimal number. +Otherwise, assume it is a decimal number. .TP \fBsub(\fIr\fB, \fIs \fR[\fB, \fIt\fR]\fB)\fR Just like @@ -3142,7 +3164,7 @@ You must also supply a text domain. Use .B TEXTDOMAIN if you want to use the current domain. .TP -\fBdcngettext(\fIstring1 \fR, \fIstring2 \fR, \fInumber \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR +\fBdcngettext(\fIstring1\fB, \fIstring2\fB, \fInumber \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR Return the plural form used for .I number of the translation of @@ -3252,7 +3274,8 @@ Calling an undefined function at run time is a fatal error. The word .B func may be used in place of -.BR function . +.BR function , +although this is deprecated. .SH DYNAMICALLY LOADING NEW FUNCTIONS You can dynamically add new built-in functions to the running .I gawk @@ -3314,11 +3337,11 @@ action to assign a value to the .B TEXTDOMAIN variable to set the text domain to a name associated with your program: .sp -.RS +.in +5m .ft B BEGIN { TEXTDOMAIN = "myprog" } .ft R -.RE +.in -5m .sp This allows .I gawk @@ -3346,7 +3369,7 @@ functions in your program, as appropriate. Run .B "gawk \-\^\-gen\-pot \-f myprog.awk > myprog.pot" to generate a -.B \&.po +.B \&.pot file for your program. .TP 5. @@ -3359,13 +3382,13 @@ The internationalization features are described in full detail in \*(EP. A primary goal for .I gawk is compatibility with the \*(PX standard, as well as with the -latest version of \*(UX +latest version of Brian Kernighan's .IR awk . To this end, .I gawk incorporates the following user visible features which are not described in the \*(AK book, -but are part of the Bell Laboratories version of +but are part of the Brian Kernighan's version of .IR awk , and are in the \*(PX standard. .PP @@ -3385,7 +3408,8 @@ was changed to match its documentation, the .B \-v option for assigning variables before program execution was added to accommodate applications that depended upon the old behavior. -(This feature was agreed upon by both the Bell Laboratories and the \*(GN developers.) +(This feature was agreed upon by both the Bell Laboratories +and the \*(GN developers.) .PP When processing arguments, .I gawk @@ -3458,7 +3482,7 @@ issues a warning about its use if is specified on the command line. .SH GNU EXTENSIONS .I Gawk -has a number of extensions to \*(PX +has a too-large number of extensions to \*(PX .IR awk . They are described in this section. All the extensions described here can be disabled by @@ -3492,6 +3516,13 @@ There is no facility for doing file inclusion mechanism). .TP \(bu +There is no facility for dynamically adding new functions +written in C +.RI ( gawk 's +.B @load +mechanism). +.TP +\(bu The .B \ex escape sequence. @@ -3595,16 +3626,17 @@ and The ability to pass an array to .BR length() . .\" New keywords or changes to keywords -.TP -\(bu -The use of -.BI delete " array" -to delete the entire contents of an array. -.TP -\(bu -The use of -.B "nextfile" -to abandon processing of the current input file. +.\" (As of 2012, these are in POSIX) +.\" .TP +.\" \(bu +.\" The use of +.\" .BI delete " array" +.\" to delete the entire contents of an array. +.\" .TP +.\" \(bu +.\" The use of +.\" .B "nextfile" +.\" to abandon processing of the current input file. .\" New functions .TP \(bu @@ -3632,12 +3664,6 @@ functions. .TP \(bu Localizable strings. -.\" Extending gawk -.TP -\(bu -Adding new built-in functions dynamically with the -.B extension() -function. .PP The \*(AK book does not define the return value of the .B close() @@ -3706,15 +3732,15 @@ The environment variable can be used to provide a list of directories that .I gawk searches when looking for files named via the -.B \-f -, -.B \-\^\-file -, +.BR \-f , +.RB \-\^\-file , .B \-i and .B \-\^\-include options. If the initial search fails, the path is searched again after -appending ".awk" to the filename. +appending +.B \&.awk +to the filename. .PP The .B AWKLIBPATH @@ -3732,10 +3758,11 @@ environment variable can be used to specify a timeout in milliseconds for reading input from a terminal, pipe or two-way communication including sockets. .PP -For socket communication, two special environment variables can be used to control the number of retries -.RB ( GAWK_SOCK_RETRIES ), -and the interval between retries -.RB ( GAWK_MSEC_SLEEP ). +For connection to a remote host via socket, +.B GAWK_SOCK_RETRIES +controls the number of retries, and +.B GAWK_MSEC_SLEEP +and the interval between retries. The interval is in milliseconds. On systems that do not support .IR usleep (3), the value is rounded up to an integral number of seconds. @@ -3804,22 +3831,12 @@ compatible with the new version of \*(UX .IR awk . Arnold Robbins is the current maintainer. .PP -The initial DOS port was done by Conrad Kwok and Scott Garfinkle. -Scott Deifik maintains the port to MS-DOS using DJGPP. -Eli Zaretskii maintains the port to MS-Windows using MinGW. -Pat Rankin did the -port to VMS, and Michal Jaegermann did the port to the Atari ST. -The port to OS/2 was done by Kai Uwe Rommel, with contributions and -help from Darrel Hankerson. -Andreas Buening now maintains the OS/2 port. -The late Fred Fish supplied support for the Amiga, -and Martin Brown provided the BeOS port. -Stephen Davies provided the original Tandem port, and -Matthew Woehlke provided changes for Tandem's POSIX-compliant systems. -Dave Pitts provided the port to z/OS. +See \*(EP for a full list of the contributors to +.I gawk +and its documentation. .PP See the -.I README +.B README file in the .I gawk distribution for up-to-date information about maintainers @@ -3937,13 +3954,13 @@ Run an external command for particular lines of data: .ft R .fi .SH ACKNOWLEDGEMENTS -Brian Kernighan of Bell Laboratories +Brian Kernighan provided valuable assistance during testing and debugging. We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009, -2010, 2011, 2012 +2010, 2011, 2012, 2013 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of @@ -3965,5 +3982,3 @@ Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. -.\" --------------- -.\" Unix / UX -> BWK diff --git a/doc/gawk.info b/doc/gawk.info index a0b7f10d..287705fa 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -5156,8 +5156,8 @@ searching for matches of a regular expression. (This program has a subtle problem--it does not work if one comment ends and another begins on the same line.) - This form of the `getline' command sets `NF', `NR', `FNR', and the -value of `$0'. + This form of the `getline' command sets `NF', `NR', `FNR', `RT', and +the value of `$0'. NOTE: The new value of `$0' is used to test the patterns of any subsequent rules. The original value of `$0' that triggered the @@ -5202,10 +5202,10 @@ and produces these results: phore free - The `getline' command used in this way sets only the variables `NR' -and `FNR' (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. + 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 +fields, so the values of the fields (including `$0') and the value of +`NF' do not change. File: gawk.info, Node: Getline/File, Next: Getline/Variable/File, Prev: Getline/Variable, Up: Getline @@ -5231,7 +5231,7 @@ with a value equal to 10 in the current input file: Because the main input stream is not used, the values of `NR' and `FNR' are not changed. However, the record it reads is split into fields in the normal manner, so the values of `$0' and the other fields -are changed, resulting in a new value of `NF'. +are changed, resulting in a new value of `NF'. `RT' is also set. According to POSIX, `getline < EXPRESSION' is ambiguous if EXPRESSION contains unparenthesized operators other than `$'; for @@ -5338,7 +5338,7 @@ different results, depending upon who is logged in on your system.) This variation of `getline' splits the record into fields, sets the value of `NF', and recomputes the value of `$0'. The values of `NR' -and `FNR' are not changed. +and `FNR' are not changed. `RT' is set. According to POSIX, `EXPRESSION | getline' is ambiguous if EXPRESSION contains unparenthesized operators other than `$'--for @@ -5406,7 +5406,7 @@ which sends a query to `db_server' and then reads the results. The values of `NR' and `FNR' are not changed, because the main input stream is not used. However, the record is split into fields in the normal manner, thus changing the values of `$0', of the other fields, -and of `NF'. +and of `NF' and `RT'. Coprocesses are an advanced feature. They are discussed here only because this is the minor node on `getline'. *Note Two-way I/O::, @@ -5424,7 +5424,7 @@ variable VAR. In this version of `getline', none of the built-in variables are changed and the record is not split into fields. The only variable -changed is VAR. +changed is VAR. However, `RT' is set. Coprocesses are an advanced feature. They are discussed here only because this is the minor node on `getline'. *Note Two-way I/O::, @@ -5505,14 +5505,15 @@ Variant Effect Standard / Extension ------------------------------------------------------------------------- `getline' Sets `$0', `NF', `FNR', Standard - and `NR' -`getline' VAR Sets VAR, `FNR', and `NR' Standard -`getline <' FILE Sets `$0' and `NF' Standard -`getline VAR < FILE' Sets VAR Standard -COMMAND `| getline' Sets `$0' and `NF' Standard -COMMAND `| getline' VAR Sets VAR Standard -COMMAND `|& getline' Sets `$0' and `NF' Extension -COMMAND `|& getline' Sets VAR Extension + `NR', and `RT' +`getline' VAR Sets VAR, `FNR', `NR', and Standard + `RT' +`getline <' FILE Sets `$0', `NF', and `RT' Standard +`getline VAR < FILE' Sets VAR and `RT' Standard +COMMAND `| getline' Sets `$0', `NF', and `RT' Standard +COMMAND `| getline' VAR Sets VAR and `RT' Standard +COMMAND `|& getline' Sets `$0', `NF', and `RT' Extension +COMMAND `|& getline' Sets VAR and `RT' Extension VAR Table 4.1: `getline' Variants and What They Set @@ -32077,430 +32078,430 @@ Node: Multiple Line220879 Ref: Multiple Line-Footnote-1226726 Node: Getline226905 Node: Plain Getline229121 -Node: Getline/Variable231210 -Node: Getline/File232351 -Node: Getline/Variable/File233673 -Ref: Getline/Variable/File-Footnote-1235272 -Node: Getline/Pipe235359 -Node: Getline/Variable/Pipe238045 -Node: Getline/Coprocess239152 -Node: Getline/Variable/Coprocess240395 -Node: Getline Notes241109 -Node: Getline Summary243896 -Ref: table-getline-variants244304 -Node: Read Timeout245162 -Ref: Read Timeout-Footnote-1248903 -Node: Command line directories248960 -Node: Printing249590 -Node: Print251221 -Node: Print Examples252558 -Node: Output Separators255342 -Node: OFMT257102 -Node: Printf258460 -Node: Basic Printf259366 -Node: Control Letters260905 -Node: Format Modifiers264717 -Node: Printf Examples270726 -Node: Redirection273441 -Node: Special Files280406 -Node: Special FD280939 -Ref: Special FD-Footnote-1284564 -Node: Special Network284638 -Node: Special Caveats285488 -Node: Close Files And Pipes286284 -Ref: Close Files And Pipes-Footnote-1293267 -Ref: Close Files And Pipes-Footnote-2293415 -Node: Expressions293565 -Node: Values294697 -Node: Constants295373 -Node: Scalar Constants296053 -Ref: Scalar Constants-Footnote-1296912 -Node: Nondecimal-numbers297094 -Node: Regexp Constants300094 -Node: Using Constant Regexps300569 -Node: Variables303624 -Node: Using Variables304279 -Node: Assignment Options306003 -Node: Conversion307875 -Ref: table-locale-affects313366 -Ref: Conversion-Footnote-1313990 -Node: All Operators314099 -Node: Arithmetic Ops314729 -Node: Concatenation317234 -Ref: Concatenation-Footnote-1320027 -Node: Assignment Ops320147 -Ref: table-assign-ops325135 -Node: Increment Ops326466 -Node: Truth Values and Conditions329901 -Node: Truth Values330984 -Node: Typing and Comparison332033 -Node: Variable Typing332822 -Ref: Variable Typing-Footnote-1336719 -Node: Comparison Operators336841 -Ref: table-relational-ops337251 -Node: POSIX String Comparison340800 -Ref: POSIX String Comparison-Footnote-1341756 -Node: Boolean Ops341894 -Ref: Boolean Ops-Footnote-1345972 -Node: Conditional Exp346063 -Node: Function Calls347795 -Node: Precedence351389 -Node: Locales355058 -Node: Patterns and Actions356147 -Node: Pattern Overview357201 -Node: Regexp Patterns358870 -Node: Expression Patterns359413 -Node: Ranges363098 -Node: BEGIN/END366064 -Node: Using BEGIN/END366826 -Ref: Using BEGIN/END-Footnote-1369557 -Node: I/O And BEGIN/END369663 -Node: BEGINFILE/ENDFILE371945 -Node: Empty374849 -Node: Using Shell Variables375165 -Node: Action Overview377450 -Node: Statements379807 -Node: If Statement381661 -Node: While Statement383160 -Node: Do Statement385204 -Node: For Statement386360 -Node: Switch Statement389512 -Node: Break Statement391609 -Node: Continue Statement393599 -Node: Next Statement395392 -Node: Nextfile Statement397782 -Node: Exit Statement400425 -Node: Built-in Variables402841 -Node: User-modified403936 -Ref: User-modified-Footnote-1412291 -Node: Auto-set412353 -Ref: Auto-set-Footnote-1425284 -Ref: Auto-set-Footnote-2425489 -Node: ARGC and ARGV425545 -Node: Arrays429396 -Node: Array Basics430901 -Node: Array Intro431727 -Node: Reference to Elements436045 -Node: Assigning Elements438315 -Node: Array Example438806 -Node: Scanning an Array440538 -Node: Controlling Scanning442852 -Ref: Controlling Scanning-Footnote-1447775 -Node: Delete448091 -Ref: Delete-Footnote-1450856 -Node: Numeric Array Subscripts450913 -Node: Uninitialized Subscripts453096 -Node: Multi-dimensional454724 -Node: Multi-scanning457818 -Node: Arrays of Arrays459409 -Node: Functions464050 -Node: Built-in464869 -Node: Calling Built-in465947 -Node: Numeric Functions467935 -Ref: Numeric Functions-Footnote-1471767 -Ref: Numeric Functions-Footnote-2472124 -Ref: Numeric Functions-Footnote-3472172 -Node: String Functions472441 -Ref: String Functions-Footnote-1495938 -Ref: String Functions-Footnote-2496067 -Ref: String Functions-Footnote-3496315 -Node: Gory Details496402 -Ref: table-sub-escapes498081 -Ref: table-sub-posix-92499435 -Ref: table-sub-proposed500786 -Ref: table-posix-sub502140 -Ref: table-gensub-escapes503685 -Ref: Gory Details-Footnote-1504861 -Ref: Gory Details-Footnote-2504912 -Node: I/O Functions505063 -Ref: I/O Functions-Footnote-1512048 -Node: Time Functions512195 -Ref: Time Functions-Footnote-1523128 -Ref: Time Functions-Footnote-2523196 -Ref: Time Functions-Footnote-3523354 -Ref: Time Functions-Footnote-4523465 -Ref: Time Functions-Footnote-5523577 -Ref: Time Functions-Footnote-6523804 -Node: Bitwise Functions524070 -Ref: table-bitwise-ops524628 -Ref: Bitwise Functions-Footnote-1528849 -Node: Type Functions529033 -Node: I18N Functions529503 -Node: User-defined531130 -Node: Definition Syntax531934 -Ref: Definition Syntax-Footnote-1536844 -Node: Function Example536913 -Node: Function Caveats539507 -Node: Calling A Function539928 -Node: Variable Scope541043 -Node: Pass By Value/Reference544006 -Node: Return Statement547514 -Node: Dynamic Typing550495 -Node: Indirect Calls551426 -Node: Library Functions561111 -Ref: Library Functions-Footnote-1564624 -Ref: Library Functions-Footnote-2564767 -Node: Library Names564938 -Ref: Library Names-Footnote-1568409 -Ref: Library Names-Footnote-2568629 -Node: General Functions568715 -Node: Strtonum Function569668 -Node: Assert Function572598 -Node: Round Function575924 -Node: Cliff Random Function577467 -Node: Ordinal Functions578483 -Ref: Ordinal Functions-Footnote-1581553 -Ref: Ordinal Functions-Footnote-2581805 -Node: Join Function582014 -Ref: Join Function-Footnote-1583785 -Node: Getlocaltime Function583985 -Node: Data File Management587700 -Node: Filetrans Function588332 -Node: Rewind Function592401 -Node: File Checking593788 -Node: Empty Files594882 -Node: Ignoring Assigns597112 -Node: Getopt Function598665 -Ref: Getopt Function-Footnote-1609969 -Node: Passwd Functions610172 -Ref: Passwd Functions-Footnote-1619147 -Node: Group Functions619235 -Node: Walking Arrays627319 -Node: Sample Programs629456 -Node: Running Examples630130 -Node: Clones630858 -Node: Cut Program632082 -Node: Egrep Program641927 -Ref: Egrep Program-Footnote-1649700 -Node: Id Program649810 -Node: Split Program653426 -Ref: Split Program-Footnote-1656945 -Node: Tee Program657073 -Node: Uniq Program659876 -Node: Wc Program667305 -Ref: Wc Program-Footnote-1671571 -Ref: Wc Program-Footnote-2671771 -Node: Miscellaneous Programs671863 -Node: Dupword Program673051 -Node: Alarm Program675082 -Node: Translate Program679831 -Ref: Translate Program-Footnote-1684218 -Ref: Translate Program-Footnote-2684446 -Node: Labels Program684580 -Ref: Labels Program-Footnote-1687951 -Node: Word Sorting688035 -Node: History Sorting691919 -Node: Extract Program693758 -Ref: Extract Program-Footnote-1701259 -Node: Simple Sed701387 -Node: Igawk Program704449 -Ref: Igawk Program-Footnote-1719606 -Ref: Igawk Program-Footnote-2719807 -Node: Anagram Program719945 -Node: Signature Program723013 -Node: Advanced Features724113 -Node: Nondecimal Data725995 -Node: Array Sorting727578 -Node: Controlling Array Traversal728275 -Node: Array Sorting Functions736513 -Ref: Array Sorting Functions-Footnote-1740187 -Ref: Array Sorting Functions-Footnote-2740280 -Node: Two-way I/O740474 -Ref: Two-way I/O-Footnote-1745906 -Node: TCP/IP Networking745976 -Node: Profiling748820 -Node: Internationalization756275 -Node: I18N and L10N757700 -Node: Explaining gettext758386 -Ref: Explaining gettext-Footnote-1763452 -Ref: Explaining gettext-Footnote-2763636 -Node: Programmer i18n763801 -Node: Translator i18n768001 -Node: String Extraction768794 -Ref: String Extraction-Footnote-1769755 -Node: Printf Ordering769841 -Ref: Printf Ordering-Footnote-1772625 -Node: I18N Portability772689 -Ref: I18N Portability-Footnote-1775138 -Node: I18N Example775201 -Ref: I18N Example-Footnote-1777836 -Node: Gawk I18N777908 -Node: Debugger778529 -Node: Debugging779500 -Node: Debugging Concepts779933 -Node: Debugging Terms781789 -Node: Awk Debugging784386 -Node: Sample Debugging Session785278 -Node: Debugger Invocation785798 -Node: Finding The Bug787130 -Node: List of Debugger Commands793618 -Node: Breakpoint Control794952 -Node: Debugger Execution Control798616 -Node: Viewing And Changing Data801976 -Node: Execution Stack805332 -Node: Debugger Info806799 -Node: Miscellaneous Debugger Commands810781 -Node: Readline Support815957 -Node: Limitations816788 -Node: Arbitrary Precision Arithmetic819040 -Ref: Arbitrary Precision Arithmetic-Footnote-1820691 -Node: General Arithmetic820839 -Node: Floating Point Issues822559 -Node: String Conversion Precision823440 -Ref: String Conversion Precision-Footnote-1825146 -Node: Unexpected Results825255 -Node: POSIX Floating Point Problems827408 -Ref: POSIX Floating Point Problems-Footnote-1831233 -Node: Integer Programming831271 -Node: Floating-point Programming833024 -Ref: Floating-point Programming-Footnote-1839333 -Node: Floating-point Representation839597 -Node: Floating-point Context840762 -Ref: table-ieee-formats841604 -Node: Rounding Mode842988 -Ref: table-rounding-modes843467 -Ref: Rounding Mode-Footnote-1846471 -Node: Gawk and MPFR846652 -Node: Arbitrary Precision Floats847894 -Ref: Arbitrary Precision Floats-Footnote-1850323 -Node: Setting Precision850634 -Node: Setting Rounding Mode853367 -Ref: table-gawk-rounding-modes853771 -Node: Floating-point Constants854951 -Node: Changing Precision856375 -Ref: Changing Precision-Footnote-1857775 -Node: Exact Arithmetic857949 -Node: Arbitrary Precision Integers861057 -Ref: Arbitrary Precision Integers-Footnote-1864057 -Node: Dynamic Extensions864204 -Node: Extension Intro865581 -Node: Plugin License866789 -Node: Extension Mechanism Outline867474 -Ref: load-extension867891 -Ref: load-new-function869369 -Ref: call-new-function870364 -Node: Extension API Description872372 -Node: Extension API Functions Introduction873704 -Node: General Data Types878482 -Ref: General Data Types-Footnote-1884084 -Node: Requesting Values884383 -Ref: table-value-types-returned885114 -Node: Constructor Functions886068 -Node: Registration Functions889064 -Node: Extension Functions889749 -Node: Exit Callback Functions891923 -Node: Extension Version String893166 -Node: Input Parsers893816 -Node: Output Wrappers903533 -Node: Two-way processors907949 -Node: Printing Messages910079 -Ref: Printing Messages-Footnote-1911156 -Node: Updating `ERRNO'911308 -Node: Accessing Parameters912047 -Node: Symbol Table Access913277 -Node: Symbol table by name913789 -Node: Symbol table by cookie915362 -Ref: Symbol table by cookie-Footnote-1919491 -Node: Cached values919554 -Ref: Cached values-Footnote-1922997 -Node: Array Manipulation923088 -Ref: Array Manipulation-Footnote-1924186 -Node: Array Data Types924225 -Ref: Array Data Types-Footnote-1926928 -Node: Array Functions927020 -Node: Flattening Arrays930786 -Node: Creating Arrays937625 -Node: Extension API Variables942420 -Node: Extension Versioning943056 -Node: Extension API Informational Variables944957 -Node: Extension API Boilerplate946043 -Node: Finding Extensions949874 -Node: Extension Example950421 -Node: Internal File Description951159 -Node: Internal File Ops954847 -Ref: Internal File Ops-Footnote-1966294 -Node: Using Internal File Ops966434 -Ref: Using Internal File Ops-Footnote-1968787 -Node: Extension Samples969053 -Node: Extension Sample File Functions970577 -Node: Extension Sample Fnmatch979050 -Node: Extension Sample Fork980776 -Node: Extension Sample Inplace981994 -Node: Extension Sample Ord983772 -Node: Extension Sample Readdir984551 -Node: Extension Sample Revout986055 -Node: Extension Sample Rev2way986648 -Node: Extension Sample Read write array987338 -Node: Extension Sample Readfile989221 -Node: Extension Sample API Tests989978 -Node: Extension Sample Time990503 -Node: gawkextlib991810 -Node: Language History994191 -Node: V7/SVR3.1995713 -Node: SVR4998034 -Node: POSIX999476 -Node: BTL1000862 -Node: POSIX/GNU1001596 -Node: Common Extensions1007131 -Node: Ranges and Locales1008286 -Ref: Ranges and Locales-Footnote-11012904 -Ref: Ranges and Locales-Footnote-21012931 -Ref: Ranges and Locales-Footnote-31013191 -Node: Contributors1013412 -Node: Installation1018216 -Node: Gawk Distribution1019110 -Node: Getting1019594 -Node: Extracting1020420 -Node: Distribution contents1022112 -Node: Unix Installation1027373 -Node: Quick Installation1027990 -Node: Additional Configuration Options1029952 -Node: Configuration Philosophy1031429 -Node: Non-Unix Installation1033771 -Node: PC Installation1034229 -Node: PC Binary Installation1035528 -Node: PC Compiling1037376 -Node: PC Testing1040320 -Node: PC Using1041496 -Node: Cygwin1045681 -Node: MSYS1046681 -Node: VMS Installation1047195 -Node: VMS Compilation1047798 -Ref: VMS Compilation-Footnote-11048805 -Node: VMS Installation Details1048863 -Node: VMS Running1050498 -Node: VMS Old Gawk1052105 -Node: Bugs1052579 -Node: Other Versions1056431 -Node: Notes1062032 -Node: Compatibility Mode1062832 -Node: Additions1063615 -Node: Accessing The Source1064542 -Node: Adding Code1065982 -Node: New Ports1072027 -Node: Derived Files1076162 -Ref: Derived Files-Footnote-11081483 -Ref: Derived Files-Footnote-21081517 -Ref: Derived Files-Footnote-31082117 -Node: Future Extensions1082215 -Node: Implementation Limitations1082796 -Node: Extension Design1084048 -Node: Old Extension Problems1085197 -Ref: Old Extension Problems-Footnote-11086705 -Node: Extension New Mechanism Goals1086762 -Ref: Extension New Mechanism Goals-Footnote-11090121 -Node: Extension Other Design Decisions1090307 -Node: Extension Future Growth1092413 -Node: Old Extension Mechanism1093234 -Node: Basic Concepts1094974 -Node: Basic High Level1095655 -Ref: figure-general-flow1095926 -Ref: figure-process-flow1096525 -Ref: Basic High Level-Footnote-11099754 -Node: Basic Data Typing1099939 -Node: Glossary1103294 -Node: Copying1128765 -Node: GNU Free Documentation License1166322 -Node: Index1191459 +Node: Getline/Variable231216 +Node: Getline/File232363 +Node: Getline/Variable/File233704 +Ref: Getline/Variable/File-Footnote-1235303 +Node: Getline/Pipe235390 +Node: Getline/Variable/Pipe238090 +Node: Getline/Coprocess239197 +Node: Getline/Variable/Coprocess240449 +Node: Getline Notes241186 +Node: Getline Summary243973 +Ref: table-getline-variants244381 +Node: Read Timeout245293 +Ref: Read Timeout-Footnote-1249034 +Node: Command line directories249091 +Node: Printing249721 +Node: Print251352 +Node: Print Examples252689 +Node: Output Separators255473 +Node: OFMT257233 +Node: Printf258591 +Node: Basic Printf259497 +Node: Control Letters261036 +Node: Format Modifiers264848 +Node: Printf Examples270857 +Node: Redirection273572 +Node: Special Files280537 +Node: Special FD281070 +Ref: Special FD-Footnote-1284695 +Node: Special Network284769 +Node: Special Caveats285619 +Node: Close Files And Pipes286415 +Ref: Close Files And Pipes-Footnote-1293398 +Ref: Close Files And Pipes-Footnote-2293546 +Node: Expressions293696 +Node: Values294828 +Node: Constants295504 +Node: Scalar Constants296184 +Ref: Scalar Constants-Footnote-1297043 +Node: Nondecimal-numbers297225 +Node: Regexp Constants300225 +Node: Using Constant Regexps300700 +Node: Variables303755 +Node: Using Variables304410 +Node: Assignment Options306134 +Node: Conversion308006 +Ref: table-locale-affects313497 +Ref: Conversion-Footnote-1314121 +Node: All Operators314230 +Node: Arithmetic Ops314860 +Node: Concatenation317365 +Ref: Concatenation-Footnote-1320158 +Node: Assignment Ops320278 +Ref: table-assign-ops325266 +Node: Increment Ops326597 +Node: Truth Values and Conditions330032 +Node: Truth Values331115 +Node: Typing and Comparison332164 +Node: Variable Typing332953 +Ref: Variable Typing-Footnote-1336850 +Node: Comparison Operators336972 +Ref: table-relational-ops337382 +Node: POSIX String Comparison340931 +Ref: POSIX String Comparison-Footnote-1341887 +Node: Boolean Ops342025 +Ref: Boolean Ops-Footnote-1346103 +Node: Conditional Exp346194 +Node: Function Calls347926 +Node: Precedence351520 +Node: Locales355189 +Node: Patterns and Actions356278 +Node: Pattern Overview357332 +Node: Regexp Patterns359001 +Node: Expression Patterns359544 +Node: Ranges363229 +Node: BEGIN/END366195 +Node: Using BEGIN/END366957 +Ref: Using BEGIN/END-Footnote-1369688 +Node: I/O And BEGIN/END369794 +Node: BEGINFILE/ENDFILE372076 +Node: Empty374980 +Node: Using Shell Variables375296 +Node: Action Overview377581 +Node: Statements379938 +Node: If Statement381792 +Node: While Statement383291 +Node: Do Statement385335 +Node: For Statement386491 +Node: Switch Statement389643 +Node: Break Statement391740 +Node: Continue Statement393730 +Node: Next Statement395523 +Node: Nextfile Statement397913 +Node: Exit Statement400556 +Node: Built-in Variables402972 +Node: User-modified404067 +Ref: User-modified-Footnote-1412422 +Node: Auto-set412484 +Ref: Auto-set-Footnote-1425415 +Ref: Auto-set-Footnote-2425620 +Node: ARGC and ARGV425676 +Node: Arrays429527 +Node: Array Basics431032 +Node: Array Intro431858 +Node: Reference to Elements436176 +Node: Assigning Elements438446 +Node: Array Example438937 +Node: Scanning an Array440669 +Node: Controlling Scanning442983 +Ref: Controlling Scanning-Footnote-1447906 +Node: Delete448222 +Ref: Delete-Footnote-1450987 +Node: Numeric Array Subscripts451044 +Node: Uninitialized Subscripts453227 +Node: Multi-dimensional454855 +Node: Multi-scanning457949 +Node: Arrays of Arrays459540 +Node: Functions464181 +Node: Built-in465000 +Node: Calling Built-in466078 +Node: Numeric Functions468066 +Ref: Numeric Functions-Footnote-1471898 +Ref: Numeric Functions-Footnote-2472255 +Ref: Numeric Functions-Footnote-3472303 +Node: String Functions472572 +Ref: String Functions-Footnote-1496069 +Ref: String Functions-Footnote-2496198 +Ref: String Functions-Footnote-3496446 +Node: Gory Details496533 +Ref: table-sub-escapes498212 +Ref: table-sub-posix-92499566 +Ref: table-sub-proposed500917 +Ref: table-posix-sub502271 +Ref: table-gensub-escapes503816 +Ref: Gory Details-Footnote-1504992 +Ref: Gory Details-Footnote-2505043 +Node: I/O Functions505194 +Ref: I/O Functions-Footnote-1512179 +Node: Time Functions512326 +Ref: Time Functions-Footnote-1523259 +Ref: Time Functions-Footnote-2523327 +Ref: Time Functions-Footnote-3523485 +Ref: Time Functions-Footnote-4523596 +Ref: Time Functions-Footnote-5523708 +Ref: Time Functions-Footnote-6523935 +Node: Bitwise Functions524201 +Ref: table-bitwise-ops524759 +Ref: Bitwise Functions-Footnote-1528980 +Node: Type Functions529164 +Node: I18N Functions529634 +Node: User-defined531261 +Node: Definition Syntax532065 +Ref: Definition Syntax-Footnote-1536975 +Node: Function Example537044 +Node: Function Caveats539638 +Node: Calling A Function540059 +Node: Variable Scope541174 +Node: Pass By Value/Reference544137 +Node: Return Statement547645 +Node: Dynamic Typing550626 +Node: Indirect Calls551557 +Node: Library Functions561242 +Ref: Library Functions-Footnote-1564755 +Ref: Library Functions-Footnote-2564898 +Node: Library Names565069 +Ref: Library Names-Footnote-1568540 +Ref: Library Names-Footnote-2568760 +Node: General Functions568846 +Node: Strtonum Function569799 +Node: Assert Function572729 +Node: Round Function576055 +Node: Cliff Random Function577598 +Node: Ordinal Functions578614 +Ref: Ordinal Functions-Footnote-1581684 +Ref: Ordinal Functions-Footnote-2581936 +Node: Join Function582145 +Ref: Join Function-Footnote-1583916 +Node: Getlocaltime Function584116 +Node: Data File Management587831 +Node: Filetrans Function588463 +Node: Rewind Function592532 +Node: File Checking593919 +Node: Empty Files595013 +Node: Ignoring Assigns597243 +Node: Getopt Function598796 +Ref: Getopt Function-Footnote-1610100 +Node: Passwd Functions610303 +Ref: Passwd Functions-Footnote-1619278 +Node: Group Functions619366 +Node: Walking Arrays627450 +Node: Sample Programs629587 +Node: Running Examples630261 +Node: Clones630989 +Node: Cut Program632213 +Node: Egrep Program642058 +Ref: Egrep Program-Footnote-1649831 +Node: Id Program649941 +Node: Split Program653557 +Ref: Split Program-Footnote-1657076 +Node: Tee Program657204 +Node: Uniq Program660007 +Node: Wc Program667436 +Ref: Wc Program-Footnote-1671702 +Ref: Wc Program-Footnote-2671902 +Node: Miscellaneous Programs671994 +Node: Dupword Program673182 +Node: Alarm Program675213 +Node: Translate Program679962 +Ref: Translate Program-Footnote-1684349 +Ref: Translate Program-Footnote-2684577 +Node: Labels Program684711 +Ref: Labels Program-Footnote-1688082 +Node: Word Sorting688166 +Node: History Sorting692050 +Node: Extract Program693889 +Ref: Extract Program-Footnote-1701390 +Node: Simple Sed701518 +Node: Igawk Program704580 +Ref: Igawk Program-Footnote-1719737 +Ref: Igawk Program-Footnote-2719938 +Node: Anagram Program720076 +Node: Signature Program723144 +Node: Advanced Features724244 +Node: Nondecimal Data726126 +Node: Array Sorting727709 +Node: Controlling Array Traversal728406 +Node: Array Sorting Functions736644 +Ref: Array Sorting Functions-Footnote-1740318 +Ref: Array Sorting Functions-Footnote-2740411 +Node: Two-way I/O740605 +Ref: Two-way I/O-Footnote-1746037 +Node: TCP/IP Networking746107 +Node: Profiling748951 +Node: Internationalization756406 +Node: I18N and L10N757831 +Node: Explaining gettext758517 +Ref: Explaining gettext-Footnote-1763583 +Ref: Explaining gettext-Footnote-2763767 +Node: Programmer i18n763932 +Node: Translator i18n768132 +Node: String Extraction768925 +Ref: String Extraction-Footnote-1769886 +Node: Printf Ordering769972 +Ref: Printf Ordering-Footnote-1772756 +Node: I18N Portability772820 +Ref: I18N Portability-Footnote-1775269 +Node: I18N Example775332 +Ref: I18N Example-Footnote-1777967 +Node: Gawk I18N778039 +Node: Debugger778660 +Node: Debugging779631 +Node: Debugging Concepts780064 +Node: Debugging Terms781920 +Node: Awk Debugging784517 +Node: Sample Debugging Session785409 +Node: Debugger Invocation785929 +Node: Finding The Bug787261 +Node: List of Debugger Commands793749 +Node: Breakpoint Control795083 +Node: Debugger Execution Control798747 +Node: Viewing And Changing Data802107 +Node: Execution Stack805463 +Node: Debugger Info806930 +Node: Miscellaneous Debugger Commands810912 +Node: Readline Support816088 +Node: Limitations816919 +Node: Arbitrary Precision Arithmetic819171 +Ref: Arbitrary Precision Arithmetic-Footnote-1820822 +Node: General Arithmetic820970 +Node: Floating Point Issues822690 +Node: String Conversion Precision823571 +Ref: String Conversion Precision-Footnote-1825277 +Node: Unexpected Results825386 +Node: POSIX Floating Point Problems827539 +Ref: POSIX Floating Point Problems-Footnote-1831364 +Node: Integer Programming831402 +Node: Floating-point Programming833155 +Ref: Floating-point Programming-Footnote-1839464 +Node: Floating-point Representation839728 +Node: Floating-point Context840893 +Ref: table-ieee-formats841735 +Node: Rounding Mode843119 +Ref: table-rounding-modes843598 +Ref: Rounding Mode-Footnote-1846602 +Node: Gawk and MPFR846783 +Node: Arbitrary Precision Floats848025 +Ref: Arbitrary Precision Floats-Footnote-1850454 +Node: Setting Precision850765 +Node: Setting Rounding Mode853498 +Ref: table-gawk-rounding-modes853902 +Node: Floating-point Constants855082 +Node: Changing Precision856506 +Ref: Changing Precision-Footnote-1857906 +Node: Exact Arithmetic858080 +Node: Arbitrary Precision Integers861188 +Ref: Arbitrary Precision Integers-Footnote-1864188 +Node: Dynamic Extensions864335 +Node: Extension Intro865712 +Node: Plugin License866920 +Node: Extension Mechanism Outline867605 +Ref: load-extension868022 +Ref: load-new-function869500 +Ref: call-new-function870495 +Node: Extension API Description872503 +Node: Extension API Functions Introduction873835 +Node: General Data Types878613 +Ref: General Data Types-Footnote-1884215 +Node: Requesting Values884514 +Ref: table-value-types-returned885245 +Node: Constructor Functions886199 +Node: Registration Functions889195 +Node: Extension Functions889880 +Node: Exit Callback Functions892054 +Node: Extension Version String893297 +Node: Input Parsers893947 +Node: Output Wrappers903664 +Node: Two-way processors908080 +Node: Printing Messages910210 +Ref: Printing Messages-Footnote-1911287 +Node: Updating `ERRNO'911439 +Node: Accessing Parameters912178 +Node: Symbol Table Access913408 +Node: Symbol table by name913920 +Node: Symbol table by cookie915493 +Ref: Symbol table by cookie-Footnote-1919622 +Node: Cached values919685 +Ref: Cached values-Footnote-1923128 +Node: Array Manipulation923219 +Ref: Array Manipulation-Footnote-1924317 +Node: Array Data Types924356 +Ref: Array Data Types-Footnote-1927059 +Node: Array Functions927151 +Node: Flattening Arrays930917 +Node: Creating Arrays937756 +Node: Extension API Variables942551 +Node: Extension Versioning943187 +Node: Extension API Informational Variables945088 +Node: Extension API Boilerplate946174 +Node: Finding Extensions950005 +Node: Extension Example950552 +Node: Internal File Description951290 +Node: Internal File Ops954978 +Ref: Internal File Ops-Footnote-1966425 +Node: Using Internal File Ops966565 +Ref: Using Internal File Ops-Footnote-1968918 +Node: Extension Samples969184 +Node: Extension Sample File Functions970708 +Node: Extension Sample Fnmatch979181 +Node: Extension Sample Fork980907 +Node: Extension Sample Inplace982125 +Node: Extension Sample Ord983903 +Node: Extension Sample Readdir984682 +Node: Extension Sample Revout986186 +Node: Extension Sample Rev2way986779 +Node: Extension Sample Read write array987469 +Node: Extension Sample Readfile989352 +Node: Extension Sample API Tests990109 +Node: Extension Sample Time990634 +Node: gawkextlib991941 +Node: Language History994322 +Node: V7/SVR3.1995844 +Node: SVR4998165 +Node: POSIX999607 +Node: BTL1000993 +Node: POSIX/GNU1001727 +Node: Common Extensions1007262 +Node: Ranges and Locales1008417 +Ref: Ranges and Locales-Footnote-11013035 +Ref: Ranges and Locales-Footnote-21013062 +Ref: Ranges and Locales-Footnote-31013322 +Node: Contributors1013543 +Node: Installation1018347 +Node: Gawk Distribution1019241 +Node: Getting1019725 +Node: Extracting1020551 +Node: Distribution contents1022243 +Node: Unix Installation1027504 +Node: Quick Installation1028121 +Node: Additional Configuration Options1030083 +Node: Configuration Philosophy1031560 +Node: Non-Unix Installation1033902 +Node: PC Installation1034360 +Node: PC Binary Installation1035659 +Node: PC Compiling1037507 +Node: PC Testing1040451 +Node: PC Using1041627 +Node: Cygwin1045812 +Node: MSYS1046812 +Node: VMS Installation1047326 +Node: VMS Compilation1047929 +Ref: VMS Compilation-Footnote-11048936 +Node: VMS Installation Details1048994 +Node: VMS Running1050629 +Node: VMS Old Gawk1052236 +Node: Bugs1052710 +Node: Other Versions1056562 +Node: Notes1062163 +Node: Compatibility Mode1062963 +Node: Additions1063746 +Node: Accessing The Source1064673 +Node: Adding Code1066113 +Node: New Ports1072158 +Node: Derived Files1076293 +Ref: Derived Files-Footnote-11081614 +Ref: Derived Files-Footnote-21081648 +Ref: Derived Files-Footnote-31082248 +Node: Future Extensions1082346 +Node: Implementation Limitations1082927 +Node: Extension Design1084179 +Node: Old Extension Problems1085328 +Ref: Old Extension Problems-Footnote-11086836 +Node: Extension New Mechanism Goals1086893 +Ref: Extension New Mechanism Goals-Footnote-11090252 +Node: Extension Other Design Decisions1090438 +Node: Extension Future Growth1092544 +Node: Old Extension Mechanism1093365 +Node: Basic Concepts1095105 +Node: Basic High Level1095786 +Ref: figure-general-flow1096057 +Ref: figure-process-flow1096656 +Ref: Basic High Level-Footnote-11099885 +Node: Basic Data Typing1100070 +Node: Glossary1103425 +Node: Copying1128896 +Node: GNU Free Documentation License1166453 +Node: Index1191590 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index abebbb41..eeb94b43 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -7423,7 +7423,7 @@ write a program that does handle multiple comments on the line. @end ignore This form of the @code{getline} command sets @code{NF}, -@code{NR}, @code{FNR}, and the value of @code{$0}. +@code{NR}, @code{FNR}, @code{RT}, and the value of @code{$0}. @quotation NOTE The new value of @code{$0} is used to test @@ -7480,7 +7480,8 @@ free @end example The @code{getline} command used in this way sets only the variables -@code{NR} and @code{FNR} (and of course, @var{var}). The record is not +@code{NR}, @code{FNR} and @code{RT} (and of course, @var{var}). +The record is not split into fields, so the values of the fields (including @code{$0}) and the value of @code{NF} do not change. @@ -7515,6 +7516,7 @@ Because the main input stream is not used, the values of @code{NR} and @code{FNR} are not changed. However, the record it reads is split into fields in the normal manner, so the values of @code{$0} and the other fields are changed, resulting in a new value of @code{NF}. +@code{RT} is also set. @cindex POSIX @command{awk}, @code{<} operator and @c Thanks to Paul Eggert for initial wording here @@ -7653,6 +7655,7 @@ depending upon who is logged in on your system.) This variation of @code{getline} splits the record into fields, sets the value of @code{NF}, and recomputes the value of @code{$0}. The values of @code{NR} and @code{FNR} are not changed. +@code{RT} is set. @cindex POSIX @command{awk}, @code{|} I/O operator and @c Thanks to Paul Eggert for initial wording here @@ -7742,7 +7745,7 @@ The values of @code{NR} and because the main input stream is not used. However, the record is split into fields in the normal manner, thus changing the values of @code{$0}, of the other fields, -and of @code{NF}. +and of @code{NF} and @code{RT}. Coprocesses are an advanced feature. They are discussed here only because this is the @value{SECTION} on @code{getline}. @@ -7760,6 +7763,7 @@ and into the variable @var{var}. In this version of @code{getline}, none of the built-in variables are changed and the record is not split into fields. The only variable changed is @var{var}. +However, @code{RT} is set. @ifinfo Coprocesses are an advanced feature. They are discussed here only because @@ -7866,14 +7870,14 @@ Note: for each variant, @command{gawk} sets the @code{RT} built-in variable. @caption{@code{getline} Variants and What They Set} @multitable @columnfractions .33 .38 .27 @headitem Variant @tab Effect @tab Standard / Extension -@item @code{getline} @tab Sets @code{$0}, @code{NF}, @code{FNR}, and @code{NR} @tab Standard -@item @code{getline} @var{var} @tab Sets @var{var}, @code{FNR}, and @code{NR} @tab Standard -@item @code{getline <} @var{file} @tab Sets @code{$0} and @code{NF} @tab Standard -@item @code{getline @var{var} < @var{file}} @tab Sets @var{var} @tab Standard -@item @var{command} @code{| getline} @tab Sets @code{$0} and @code{NF} @tab Standard -@item @var{command} @code{| getline} @var{var} @tab Sets @var{var} @tab Standard -@item @var{command} @code{|& getline} @tab Sets @code{$0} and @code{NF} @tab Extension -@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var} @tab Extension +@item @code{getline} @tab Sets @code{$0}, @code{NF}, @code{FNR}, @code{NR}, and @code{RT} @tab Standard +@item @code{getline} @var{var} @tab Sets @var{var}, @code{FNR}, @code{NR}, and @code{RT} @tab Standard +@item @code{getline <} @var{file} @tab Sets @code{$0}, @code{NF}, and @code{RT} @tab Standard +@item @code{getline @var{var} < @var{file}} @tab Sets @var{var} and @code{RT} @tab Standard +@item @var{command} @code{| getline} @tab Sets @code{$0}, @code{NF}, and @code{RT} @tab Standard +@item @var{command} @code{| getline} @var{var} @tab Sets @var{var} and @code{RT} @tab Standard +@item @var{command} @code{|& getline} @tab Sets @code{$0}, @code{NF}, and @code{RT} @tab Extension +@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var} and @code{RT} @tab Extension @end multitable @end float @c ENDOFRANGE getl diff --git a/doc/gawkman.texi b/doc/gawkman.texi index 2998e0b4..e471f3fa 100644 --- a/doc/gawkman.texi +++ b/doc/gawkman.texi @@ -7049,7 +7049,7 @@ write a program that does handle multiple comments on the line. @end ignore This form of the @code{getline} command sets @code{NF}, -@code{NR}, @code{FNR}, and the value of @code{$0}. +@code{NR}, @code{FNR}, @code{RT}, and the value of @code{$0}. @quotation NOTE The new value of @code{$0} is used to test @@ -7106,7 +7106,8 @@ free @end example The @code{getline} command used in this way sets only the variables -@code{NR} and @code{FNR} (and of course, @var{var}). The record is not +@code{NR}, @code{FNR} and @code{RT} (and of course, @var{var}). +The record is not split into fields, so the values of the fields (including @code{$0}) and the value of @code{NF} do not change. @@ -7141,6 +7142,7 @@ Because the main input stream is not used, the values of @code{NR} and @code{FNR} are not changed. However, the record it reads is split into fields in the normal manner, so the values of @code{$0} and the other fields are changed, resulting in a new value of @code{NF}. +@code{RT} is also set. @cindex POSIX @command{awk}, @code{<} operator and @c Thanks to Paul Eggert for initial wording here @@ -7279,6 +7281,7 @@ depending upon who is logged in on your system.) This variation of @code{getline} splits the record into fields, sets the value of @code{NF}, and recomputes the value of @code{$0}. The values of @code{NR} and @code{FNR} are not changed. +@code{RT} is set. @cindex POSIX @command{awk}, @code{|} I/O operator and @c Thanks to Paul Eggert for initial wording here @@ -7368,7 +7371,7 @@ The values of @code{NR} and because the main input stream is not used. However, the record is split into fields in the normal manner, thus changing the values of @code{$0}, of the other fields, -and of @code{NF}. +and of @code{NF} and @code{RT}. Coprocesses are an advanced feature. They are discussed here only because this is the @value{SECTION} on @code{getline}. @@ -7386,6 +7389,7 @@ and into the variable @var{var}. In this version of @code{getline}, none of the built-in variables are changed and the record is not split into fields. The only variable changed is @var{var}. +However, @code{RT} is set. @ifinfo Coprocesses are an advanced feature. They are discussed here only because @@ -7492,14 +7496,14 @@ Note: for each variant, @command{gawk} sets the @code{RT} built-in variable. @caption{@code{getline} Variants and What They Set} @multitable @columnfractions .33 .38 .27 @headitem Variant @tab Effect @tab Standard / Extension -@item @code{getline} @tab Sets @code{$0}, @code{NF}, @code{FNR}, and @code{NR} @tab Standard -@item @code{getline} @var{var} @tab Sets @var{var}, @code{FNR}, and @code{NR} @tab Standard -@item @code{getline <} @var{file} @tab Sets @code{$0} and @code{NF} @tab Standard -@item @code{getline @var{var} < @var{file}} @tab Sets @var{var} @tab Standard -@item @var{command} @code{| getline} @tab Sets @code{$0} and @code{NF} @tab Standard -@item @var{command} @code{| getline} @var{var} @tab Sets @var{var} @tab Standard -@item @var{command} @code{|& getline} @tab Sets @code{$0} and @code{NF} @tab Extension -@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var} @tab Extension +@item @code{getline} @tab Sets @code{$0}, @code{NF}, @code{FNR}, @code{NR}, and @code{RT} @tab Standard +@item @code{getline} @var{var} @tab Sets @var{var}, @code{FNR}, @code{NR}, and @code{RT} @tab Standard +@item @code{getline <} @var{file} @tab Sets @code{$0}, @code{NF}, and @code{RT} @tab Standard +@item @code{getline @var{var} < @var{file}} @tab Sets @var{var} and @code{RT} @tab Standard +@item @var{command} @code{| getline} @tab Sets @code{$0}, @code{NF}, and @code{RT} @tab Standard +@item @var{command} @code{| getline} @var{var} @tab Sets @var{var} and @code{RT} @tab Standard +@item @var{command} @code{|& getline} @tab Sets @code{$0}, @code{NF}, and @code{RT} @tab Extension +@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var} and @code{RT} @tab Extension @end multitable @end float @c ENDOFRANGE getl |