aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-04-07 21:56:55 +0300
committerArnold D. Robbins <arnold@skeeve.com>2011-04-07 21:56:55 +0300
commitdb1282820c0e8b51b8aac84e5b2eabc3b6ea0174 (patch)
tree9cc414fe4af06fcfa867a140a1ab2a63c436ab41
parentc0583c31b8d47bd55e9340e7434cf9ccf7336f6d (diff)
downloadegawk-db1282820c0e8b51b8aac84e5b2eabc3b6ea0174.tar.gz
egawk-db1282820c0e8b51b8aac84e5b2eabc3b6ea0174.tar.bz2
egawk-db1282820c0e8b51b8aac84e5b2eabc3b6ea0174.zip
Removed Nextfile Function from doc.
-rw-r--r--doc/ChangeLog9
-rw-r--r--doc/gawk.info949
-rw-r--r--doc/gawk.texi148
3 files changed, 428 insertions, 678 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 2f25cb6a..cdc4fd39 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,12 @@
+Thu Apr 7 21:55:27 2011 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi (Nextfile Function): Removed, along with all references,
+ since only gawk and MKS awk allow next from a function, so this
+ function was useless for most people. Strange that noone noticed.
+ I wonder who really reads the doc?
+
+ Lots of other fixes have been going in too.
+
Sun Mar 27 21:10:55 2011 Pat Rankin <rankin@pactechdata.com>
* gawk.texi (Builit-in Variables: PROCINFO array, Scanning All
diff --git a/doc/gawk.info b/doc/gawk.info
index fde25465..a67eafbb 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -363,8 +363,6 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Library Names:: How to best name private global variables
in library functions.
* General Functions:: Functions that are of general use.
-* Nextfile Function:: Two implementations of a `nextfile'
- function.
* Strtonum Function:: A replacement for the built-in
`strtonum()' function.
* Assert Function:: A function for assertions in `awk'
@@ -8993,10 +8991,6 @@ files, pipes, and coprocesses that are opened with redirections. It is
not related to the main processing that `awk' does with the files
listed in `ARGV'.
- If it's necessary to use an `awk' version that doesn't support
-`nextfile', see *note Nextfile Function::, for a user-defined function
-that simulates the `nextfile' statement.
-
The current version of the Brian Kernighan's `awk' (*note Other
Versions::) also supports `nextfile'. However, it doesn't allow the
`nextfile' statement inside function bodies (*note User-defined::).
@@ -14023,9 +14017,7 @@ for different implementations of `awk' is pretty straightforward.
`/dev/stderr', or if you cannot use `gawk'.
* A number of programs use `nextfile' (*note Nextfile Statement::)
- to skip any remaining input in the input file. *note Nextfile
- Function::, shows you how to write a function that does the same
- thing.
+ to skip any remaining input in the input file.
* Finally, some of the programs choose to ignore upper- and lowercase
distinctions in their input. They do so by assigning one to
@@ -14148,8 +14140,6 @@ programming use.
* Menu:
-* Nextfile Function:: Two implementations of a `nextfile'
- function.
* Strtonum Function:: A replacement for the built-in
`strtonum()' function.
* Assert Function:: A function for assertions in `awk'
@@ -14163,98 +14153,9 @@ programming use.
* Gettimeofday Function:: A function to get formatted times.

-File: gawk.info, Node: Nextfile Function, Next: Strtonum Function, Up: General Functions
-
-12.2.1 Implementing `nextfile' as a Function
---------------------------------------------
-
-The `nextfile' statement, presented in *note Nextfile Statement::, is a
-`gawk'-specific extension--it is not available in most other
-implementations of `awk'. This minor node shows two versions of a
-`nextfile()' function that you can use to simulate `gawk''s `nextfile'
-statement if you cannot use `gawk'.
-
- A first attempt at writing a `nextfile()' function is as follows:
-
- # nextfile --- skip remaining records in current file
- # this should be read in before the "main" awk program
-
- function nextfile() { _abandon_ = FILENAME; next }
- _abandon_ == FILENAME { next }
-
- Because it supplies a rule that must be executed first, this file
-should be included before the main program. This rule compares the
-current data file's name (which is always in the `FILENAME' variable) to
-a private variable named `_abandon_'. If the file name matches, then
-the action part of the rule executes a `next' statement to go on to the
-next record. (The use of `_' in the variable name is a convention. It
-is discussed more fully in *note Library Names::.)
-
- The use of the `next' statement effectively creates a loop that reads
-all the records from the current data file. The end of the file is
-eventually reached and a new data file is opened, changing the value of
-`FILENAME'. Once this happens, the comparison of `_abandon_' to
-`FILENAME' fails, and execution continues with the first rule of the
-"real" program.
-
- The `nextfile()' function itself simply sets the value of `_abandon_'
-and then executes a `next' statement to start the loop.
-
- This initial version has a subtle problem. If the same data file is
-listed _twice_ on the command line, one right after the other or even
-with just a variable assignment between them, this code skips right
-through the file a second time, even though it should stop when it gets
-to the end of the first occurrence. A second version of `nextfile()'
-that remedies this problem is shown here:
-
- # nextfile --- skip remaining records in current file
- # correctly handle successive occurrences of the same file
- # this should be read in before the "main" awk program
-
- function nextfile() { _abandon_ = FILENAME; next }
-
- _abandon_ == FILENAME {
- if (FNR == 1)
- _abandon_ = ""
- else
- next
- }
+File: gawk.info, Node: Strtonum Function, Next: Assert Function, Up: General Functions
- The `nextfile()' function has not changed. It makes `_abandon_'
-equal to the current file name and then executes a `next' statement.
-The `next' statement reads the next record and increments `FNR' so that
-`FNR' is guaranteed to have a value of at least two. However, if
-`nextfile()' is called for the last record in the file, then `awk'
-closes the current data file and moves on to the next one. Upon doing
-so, `FILENAME' is set to the name of the new file and `FNR' is reset to
-one. If this next file is the same as the previous one, `_abandon_' is
-still equal to `FILENAME'. However, `FNR' is equal to one, telling us
-that this is a new occurrence of the file and not the one we were
-reading when the `nextfile()' function was executed. In that case,
-`_abandon_' is reset to the empty string, so that further executions of
-this rule fail (until the next time that `nextfile()' is called).
-
- If `FNR' is not one, then we are still in the original data file and
-the program executes a `next' statement to skip through it.
-
- An important question to ask at this point is: given that the
-functionality of `nextfile' can be provided with a library file, why is
-it built into `gawk'? Adding features for little reason leads to
-larger, slower programs that are harder to maintain. The answer is
-that building `nextfile' into `gawk' provides significant gains in
-efficiency. If the `nextfile()' function is executed at the beginning
-of a large data file, `awk' still has to scan the entire file,
-splitting it up into records, just to skip over it. The built-in
-`nextfile' can simply close the file immediately and proceed to the
-next one, which saves a lot of time. This is particularly important in
-`awk', because `awk' programs are generally I/O-bound (i.e., they spend
-most of their time doing input and output, instead of performing
-computations).
-
-
-File: gawk.info, Node: Strtonum Function, Next: Assert Function, Prev: Nextfile Function, Up: General Functions
-
-12.2.2 Converting Strings To Numbers
+12.2.1 Converting Strings To Numbers
------------------------------------
The `strtonum()' function (*note String Functions::) is a `gawk'
@@ -14338,7 +14239,7 @@ be tested with `gawk' and the results compared to the built-in

File: gawk.info, Node: Assert Function, Next: Round Function, Prev: Strtonum Function, Up: General Functions
-12.2.3 Assertions
+12.2.2 Assertions
-----------------
When writing large programs, it is often useful to know that a
@@ -14424,7 +14325,7 @@ rule always ends with an `exit' statement.

File: gawk.info, Node: Round Function, Next: Cliff Random Function, Prev: Assert Function, Up: General Functions
-12.2.4 Rounding Numbers
+12.2.3 Rounding Numbers
-----------------------
The way `printf' and `sprintf()' (*note Printf::) perform rounding
@@ -14470,7 +14371,7 @@ might be useful if your `awk''s `printf' does unbiased rounding:

File: gawk.info, Node: Cliff Random Function, Next: Ordinal Functions, Prev: Round Function, Up: General Functions
-12.2.5 The Cliff Random Number Generator
+12.2.4 The Cliff Random Number Generator
----------------------------------------
The Cliff random number generator
@@ -14499,7 +14400,7 @@ might try using this function instead.

File: gawk.info, Node: Ordinal Functions, Next: Join Function, Prev: Cliff Random Function, Up: General Functions
-12.2.6 Translating Between Characters and Numbers
+12.2.5 Translating Between Characters and Numbers
-------------------------------------------------
One commercial implementation of `awk' supplies a built-in function,
@@ -14597,7 +14498,7 @@ extensions, you can simplify `_ord_init' to loop from 0 to 255.

File: gawk.info, Node: Join Function, Next: Gettimeofday Function, Prev: Ordinal Functions, Up: General Functions
-12.2.7 Merging an Array into a String
+12.2.6 Merging an Array into a String
-------------------------------------
When doing string processing, it is often useful to be able to join all
@@ -14644,7 +14545,7 @@ makes string operations more difficult than they really need to be.

File: gawk.info, Node: Gettimeofday Function, Prev: Join Function, Up: General Functions
-12.2.8 Managing the Time of Day
+12.2.7 Managing the Time of Day
-------------------------------
The `systime()' and `strftime()' functions described in *note Time
@@ -14802,11 +14703,10 @@ for the last file. Because this `END' rule comes before any `END' rules
supplied in the "main" program, `endfile()' is called first. Once
again the value of multiple `BEGIN' and `END' rules should be clear.
- This version has same problem as the first version of `nextfile()'
-(*note Nextfile Function::). If the same data file occurs twice in a
-row on the command line, then `endfile()' and `beginfile()' are not
-executed at the end of the first pass and at the beginning of the
-second pass. The following version solves the problem:
+ If the same data file occurs twice in a row on the command line, then
+`endfile()' and `beginfile()' are not executed at the end of the first
+pass and at the beginning of the second pass. The following version
+solves the problem:
# ftrans.awk --- handle data file transitions
#
@@ -14879,8 +14779,7 @@ presented in *note Filetrans Function::, to either update `ARGIND' on
your own or modify this code as appropriate.
The `rewind()' function also relies on the `nextfile' keyword (*note
-Nextfile Statement::). *Note Nextfile Function::, for a function
-version of `nextfile'.
+Nextfile Statement::).

File: gawk.info, Node: File Checking, Next: Empty Files, Prev: Rewind Function, Up: Data File Management
@@ -24877,7 +24776,7 @@ Index
* case keyword: Switch Statement. (line 6)
* case sensitivity, array indices and: Array Intro. (line 92)
* case sensitivity, converting case: String Functions. (line 504)
-* case sensitivity, example programs: Library Functions. (line 44)
+* case sensitivity, example programs: Library Functions. (line 42)
* case sensitivity, gawk: Case-sensitivity. (line 26)
* case sensitivity, regexps and <1>: User-modified. (line 82)
* case sensitivity, regexps and: Case-sensitivity. (line 6)
@@ -25600,7 +25499,6 @@ Index
(line 6)
* functions, library, merging arrays into strings: Join Function.
(line 6)
-* functions, library, nextfile statement: Nextfile Function. (line 6)
* functions, library, rounding numbers: Round Function. (line 6)
* functions, library, user database, reading: Passwd Functions.
(line 6)
@@ -25616,7 +25514,7 @@ Index
* functions, user-defined, counts: Profiling. (line 132)
* functions, user-defined, library of: Library Functions. (line 6)
* functions, user-defined, next/nextfile statements and <1>: Nextfile Statement.
- (line 44)
+ (line 40)
* functions, user-defined, next/nextfile statements and: Next Statement.
(line 45)
* G-d: Acknowledgments. (line 81)
@@ -25686,7 +25584,6 @@ Index
* gawk, MS-DOS version of: PC Using. (line 11)
* gawk, MS-Windows version of: PC Using. (line 11)
* gawk, newlines in: Statements/Lines. (line 12)
-* gawk, nextfile statement in: Nextfile Function. (line 6)
* gawk, octal numbers and: Nondecimal-numbers. (line 42)
* gawk, OS/2 version of: PC Using. (line 11)
* gawk, PROCINFO array in <1>: Two-way I/O. (line 116)
@@ -25830,7 +25727,7 @@ Index
* IGNORECASE variable, array sorting and: Array Sorting. (line 68)
* IGNORECASE variable, array subscripts and: Array Intro. (line 92)
* IGNORECASE variable, in example programs: Library Functions.
- (line 44)
+ (line 42)
* implementation issues, gawk: Notes. (line 6)
* implementation issues, gawk, debugging: Compatibility Mode. (line 6)
* implementation issues, gawk, limits <1>: Redirection. (line 135)
@@ -25856,7 +25753,6 @@ Index
* input files, examples: Sample Data Files. (line 6)
* input files, reading: Reading Files. (line 6)
* input files, running awk without: Read Terminal. (line 6)
-* input files, skipping: Nextfile Function. (line 6)
* input files, variable assignments and: Other Arguments. (line 19)
* input pipeline: Getline/Pipe. (line 6)
* input redirection: Getline/File. (line 6)
@@ -26003,8 +25899,6 @@ Index
(line 6)
* libraries of awk functions, merging arrays into strings: Join Function.
(line 6)
-* libraries of awk functions, nextfile statement: Nextfile Function.
- (line 6)
* libraries of awk functions, rounding numbers: Round Function.
(line 6)
* libraries of awk functions, user database, reading: Passwd Functions.
@@ -26129,10 +26023,8 @@ Index
(line 37)
* nextfile statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
(line 26)
-* nextfile statement, implementing: Nextfile Function. (line 6)
* nextfile statement, user-defined functions and: Nextfile Statement.
- (line 44)
-* nextfile() user-defined function: Nextfile Function. (line 38)
+ (line 40)
* nexti debugger command: Dgawk Execution Control.
(line 49)
* NF variable <1>: Auto-set. (line 107)
@@ -26453,8 +26345,6 @@ Index
* programming conventions, functions, writing: Definition Syntax.
(line 55)
* programming conventions, gawk internals: Internal File Ops. (line 33)
-* programming conventions, nextfile statement: Nextfile Function.
- (line 20)
* programming conventions, private variable names: Library Names.
(line 23)
* programming language, recipe for: History. (line 6)
@@ -27051,407 +26941,406 @@ Index

Tag Table:
Node: Top1346
-Node: Foreword30042
-Node: Preface34387
-Ref: Preface-Footnote-137354
-Ref: Preface-Footnote-237460
-Node: History37692
-Node: Names40083
-Ref: Names-Footnote-141560
-Node: This Manual41632
-Ref: This Manual-Footnote-146580
-Node: Conventions46680
-Node: Manual History48814
-Ref: Manual History-Footnote-152084
-Ref: Manual History-Footnote-252125
-Node: How To Contribute52199
-Node: Acknowledgments53343
-Node: Getting Started57674
-Node: Running gawk60053
-Node: One-shot61239
-Node: Read Terminal62464
-Ref: Read Terminal-Footnote-164114
-Ref: Read Terminal-Footnote-264390
-Node: Long64561
-Node: Executable Scripts65937
-Ref: Executable Scripts-Footnote-167806
-Ref: Executable Scripts-Footnote-267908
-Node: Comments68359
-Node: Quoting70826
-Node: DOS Quoting75449
-Node: Sample Data Files76124
-Node: Very Simple79156
-Node: Two Rules83755
-Node: More Complex85902
-Ref: More Complex-Footnote-188832
-Node: Statements/Lines88917
-Ref: Statements/Lines-Footnote-193379
-Node: Other Features93644
-Node: When94572
-Node: Invoking Gawk96719
-Node: Command Line98104
-Node: Options98887
-Ref: Options-Footnote-1112019
-Node: Other Arguments112044
-Node: Naming Standard Input114702
-Node: Environment Variables115796
-Node: AWKPATH Variable116240
-Ref: AWKPATH Variable-Footnote-1118837
-Node: Other Environment Variables119097
-Node: Exit Status121437
-Node: Include Files122112
-Node: Obsolete125597
-Node: Undocumented126283
-Node: Regexp126524
-Node: Regexp Usage127976
-Node: Escape Sequences130002
-Node: Regexp Operators135765
-Ref: Regexp Operators-Footnote-1142962
-Ref: Regexp Operators-Footnote-2143109
-Node: Bracket Expressions143207
-Ref: table-char-classes145010
-Node: GNU Regexp Operators147654
-Node: Case-sensitivity151377
-Ref: Case-sensitivity-Footnote-1154345
-Ref: Case-sensitivity-Footnote-2154580
-Node: Leftmost Longest154688
-Node: Computed Regexps155889
-Node: Locales159315
-Node: Reading Files163022
-Node: Records164963
-Ref: Records-Footnote-1173637
-Node: Fields173674
-Ref: Fields-Footnote-1176707
-Node: Nonconstant Fields176793
-Node: Changing Fields178995
-Node: Field Separators184973
-Node: Default Field Splitting187602
-Node: Regexp Field Splitting188719
-Node: Single Character Fields192061
-Node: Command Line Field Separator193120
-Node: Field Splitting Summary196561
-Ref: Field Splitting Summary-Footnote-1199753
-Node: Constant Size199854
-Node: Splitting By Content204438
-Ref: Splitting By Content-Footnote-1208164
-Node: Multiple Line208204
-Ref: Multiple Line-Footnote-1214051
-Node: Getline214230
-Node: Plain Getline216458
-Node: Getline/Variable218547
-Node: Getline/File219688
-Node: Getline/Variable/File221010
-Ref: Getline/Variable/File-Footnote-1222609
-Node: Getline/Pipe222696
-Node: Getline/Variable/Pipe225256
-Node: Getline/Coprocess226363
-Node: Getline/Variable/Coprocess227606
-Node: Getline Notes228320
-Node: Getline Summary230262
-Ref: table-getline-variants230605
-Node: Command line directories231461
-Node: Printing232086
-Node: Print233717
-Node: Print Examples235054
-Node: Output Separators237838
-Node: OFMT239598
-Node: Printf240956
-Node: Basic Printf241862
-Node: Control Letters243401
-Node: Format Modifiers247213
-Node: Printf Examples253222
-Node: Redirection255937
-Node: Special Files262921
-Node: Special FD263454
-Ref: Special FD-Footnote-1267078
-Node: Special Network267152
-Node: Special Caveats268002
-Node: Close Files And Pipes268798
-Ref: Close Files And Pipes-Footnote-1275821
-Ref: Close Files And Pipes-Footnote-2275969
-Node: Expressions276119
-Node: Values277188
-Node: Constants277864
-Node: Scalar Constants278544
-Ref: Scalar Constants-Footnote-1279403
-Node: Nondecimal-numbers279585
-Node: Regexp Constants282644
-Node: Using Constant Regexps283119
-Node: Variables286174
-Node: Using Variables286829
-Node: Assignment Options288553
-Node: Conversion290425
-Ref: table-locale-affects295801
-Ref: Conversion-Footnote-1296425
-Node: All Operators296534
-Node: Arithmetic Ops297164
-Node: Concatenation299669
-Ref: Concatenation-Footnote-1302462
-Node: Assignment Ops302582
-Ref: table-assign-ops307570
-Node: Increment Ops308978
-Node: Truth Values and Conditions312448
-Node: Truth Values313531
-Node: Typing and Comparison314580
-Node: Variable Typing315369
-Ref: Variable Typing-Footnote-1319266
-Node: Comparison Operators319388
-Ref: table-relational-ops319798
-Node: POSIX String Comparison323347
-Ref: POSIX String Comparison-Footnote-1324303
-Node: Boolean Ops324441
-Ref: Boolean Ops-Footnote-1328519
-Node: Conditional Exp328610
-Node: Function Calls330342
-Node: Precedence333936
-Node: Patterns and Actions337589
-Node: Pattern Overview338643
-Node: Regexp Patterns340309
-Node: Expression Patterns340852
-Node: Ranges344426
-Node: BEGIN/END347392
-Node: Using BEGIN/END348154
-Ref: Using BEGIN/END-Footnote-1350885
-Node: I/O And BEGIN/END350991
-Node: BEGINFILE/ENDFILE353273
-Node: Empty356104
-Node: Using Shell Variables356420
-Node: Action Overview358705
-Node: Statements361062
-Node: If Statement362916
-Node: While Statement364415
-Node: Do Statement366459
-Node: For Statement367615
-Node: Switch Statement370767
-Node: Break Statement372864
-Node: Continue Statement374854
-Node: Next Statement376641
-Node: Nextfile Statement379031
-Node: Exit Statement381507
-Node: Built-in Variables383923
-Node: User-modified385018
-Ref: User-modified-Footnote-1393044
-Node: Auto-set393106
-Ref: Auto-set-Footnote-1403848
-Node: ARGC and ARGV404053
-Node: Arrays407904
-Node: Array Basics409475
-Node: Array Intro410186
-Node: Reference to Elements414504
-Node: Assigning Elements416774
-Node: Array Example417265
-Node: Scanning an Array418997
-Node: Controlling Scanning421373
-Node: Delete424711
-Ref: Delete-Footnote-1427146
-Node: Numeric Array Subscripts427203
-Node: Uninitialized Subscripts429386
-Node: Multi-dimensional431014
-Node: Multi-scanning434105
-Node: Array Sorting435689
-Ref: Array Sorting-Footnote-1438783
-Node: Arrays of Arrays438977
-Node: Functions443550
-Node: Built-in444372
-Node: Calling Built-in445450
-Node: Numeric Functions447438
-Ref: Numeric Functions-Footnote-1451203
-Ref: Numeric Functions-Footnote-2451560
-Ref: Numeric Functions-Footnote-3451608
-Node: String Functions451877
-Ref: String Functions-Footnote-1474379
-Ref: String Functions-Footnote-2474508
-Ref: String Functions-Footnote-3474756
-Node: Gory Details474843
-Ref: table-sub-escapes476522
-Ref: table-posix-sub477836
-Ref: table-gensub-escapes478749
-Node: I/O Functions479920
-Ref: I/O Functions-Footnote-1486575
-Node: Time Functions486722
-Ref: Time Functions-Footnote-1497614
-Ref: Time Functions-Footnote-2497682
-Ref: Time Functions-Footnote-3497840
-Ref: Time Functions-Footnote-4497951
-Ref: Time Functions-Footnote-5498063
-Ref: Time Functions-Footnote-6498290
-Node: Bitwise Functions498556
-Ref: table-bitwise-ops499114
-Ref: Bitwise Functions-Footnote-1503274
-Node: Type Functions503458
-Node: I18N Functions503928
-Node: User-defined505555
-Node: Definition Syntax506359
-Ref: Definition Syntax-Footnote-1511269
-Node: Function Example511338
-Node: Function Caveats513932
-Node: Calling A Function514353
-Node: Variable Scope515468
-Node: Pass By Value/Reference517443
-Node: Return Statement520883
-Node: Dynamic Typing523864
-Node: Indirect Calls524599
-Node: Internationalization534284
-Node: I18N and L10N535710
-Node: Explaining gettext536396
-Ref: Explaining gettext-Footnote-1541462
-Ref: Explaining gettext-Footnote-2541646
-Node: Programmer i18n541811
-Node: Translator i18n546011
-Node: String Extraction546804
-Ref: String Extraction-Footnote-1547765
-Node: Printf Ordering547851
-Ref: Printf Ordering-Footnote-1550635
-Node: I18N Portability550699
-Ref: I18N Portability-Footnote-1553148
-Node: I18N Example553211
-Ref: I18N Example-Footnote-1555846
-Node: Gawk I18N555918
-Node: Advanced Features556535
-Node: Nondecimal Data557854
-Node: Two-way I/O559435
-Ref: Two-way I/O-Footnote-1564869
-Node: TCP/IP Networking564939
-Node: Profiling567783
-Node: Library Functions575257
-Ref: Library Functions-Footnote-1578362
-Node: Library Names578533
-Ref: Library Names-Footnote-1582004
-Ref: Library Names-Footnote-2582224
-Node: General Functions582310
-Node: Nextfile Function583373
-Node: Strtonum Function587754
-Node: Assert Function590710
-Node: Round Function594036
-Node: Cliff Random Function595579
-Node: Ordinal Functions596595
-Ref: Ordinal Functions-Footnote-1599665
-Ref: Ordinal Functions-Footnote-2599917
-Node: Join Function600126
-Ref: Join Function-Footnote-1601897
-Node: Gettimeofday Function602097
-Node: Data File Management605812
-Node: Filetrans Function606444
-Node: Rewind Function610680
-Node: File Checking612133
-Node: Empty Files613227
-Node: Ignoring Assigns615457
-Node: Getopt Function617010
-Ref: Getopt Function-Footnote-1628314
-Node: Passwd Functions628517
-Ref: Passwd Functions-Footnote-1637492
-Node: Group Functions637580
-Node: Walking Arrays645664
-Node: Sample Programs647233
-Node: Running Examples647898
-Node: Clones648626
-Node: Cut Program649850
-Node: Egrep Program659695
-Ref: Egrep Program-Footnote-1667468
-Node: Id Program667578
-Node: Split Program671194
-Ref: Split Program-Footnote-1674713
-Node: Tee Program674841
-Node: Uniq Program677644
-Node: Wc Program685073
-Ref: Wc Program-Footnote-1689339
-Ref: Wc Program-Footnote-2689539
-Node: Miscellaneous Programs689631
-Node: Dupword Program690819
-Node: Alarm Program692850
-Node: Translate Program697599
-Ref: Translate Program-Footnote-1701986
-Ref: Translate Program-Footnote-2702214
-Node: Labels Program702348
-Ref: Labels Program-Footnote-1705719
-Node: Word Sorting705803
-Node: History Sorting709687
-Node: Extract Program711526
-Ref: Extract Program-Footnote-1719009
-Node: Simple Sed719137
-Node: Igawk Program722199
-Ref: Igawk Program-Footnote-1737232
-Ref: Igawk Program-Footnote-2737433
-Node: Anagram Program737571
-Node: Signature Program740639
-Node: Debugger741739
-Node: Debugging742650
-Node: Debugging Concepts743063
-Node: Debugging Terms744919
-Node: Awk Debugging747541
-Node: Sample dgawk session748433
-Node: dgawk invocation748925
-Node: Finding The Bug750107
-Node: List of Debugger Commands756593
-Node: Breakpoint Control757904
-Node: Dgawk Execution Control761540
-Node: Viewing And Changing Data764891
-Node: Dgawk Stack768228
-Node: Dgawk Info769688
-Node: Miscellaneous Dgawk Commands773636
-Node: Readline Support779064
-Node: Dgawk Limitations779902
-Node: Language History782091
-Node: V7/SVR3.1783529
-Node: SVR4785850
-Node: POSIX787292
-Node: BTL788300
-Node: POSIX/GNU789034
-Node: Common Extensions794135
-Node: Contributors795236
-Node: Installation799375
-Node: Gawk Distribution800269
-Node: Getting800753
-Node: Extracting801579
-Node: Distribution contents803271
-Node: Unix Installation808493
-Node: Quick Installation809110
-Node: Additional Configuration Options811072
-Node: Configuration Philosophy812549
-Node: Non-Unix Installation814891
-Node: PC Installation815349
-Node: PC Binary Installation816648
-Node: PC Compiling818496
-Node: PC Testing821440
-Node: PC Using822616
-Node: Cygwin826801
-Node: MSYS827801
-Node: VMS Installation828315
-Node: VMS Compilation828918
-Ref: VMS Compilation-Footnote-1829925
-Node: VMS Installation Details829983
-Node: VMS Running831618
-Node: VMS Old Gawk833225
-Node: Bugs833699
-Node: Other Versions837609
-Node: Notes842888
-Node: Compatibility Mode843580
-Node: Additions844363
-Node: Accessing The Source845175
-Node: Adding Code846600
-Node: New Ports852567
-Node: Dynamic Extensions856680
-Node: Internals858056
-Node: Plugin License867159
-Node: Sample Library867793
-Node: Internal File Description868479
-Node: Internal File Ops872194
-Ref: Internal File Ops-Footnote-1876975
-Node: Using Internal File Ops877115
-Node: Future Extensions879492
-Node: Basic Concepts881996
-Node: Basic High Level882753
-Ref: Basic High Level-Footnote-1886788
-Node: Basic Data Typing886973
-Node: Floating Point Issues891498
-Node: String Conversion Precision892581
-Ref: String Conversion Precision-Footnote-1894275
-Node: Unexpected Results894384
-Node: POSIX Floating Point Problems896210
-Ref: POSIX Floating Point Problems-Footnote-1899912
-Node: Glossary899950
-Node: Copying924093
-Node: GNU Free Documentation License961650
-Node: Index986787
+Node: Foreword29926
+Node: Preface34271
+Ref: Preface-Footnote-137238
+Ref: Preface-Footnote-237344
+Node: History37576
+Node: Names39967
+Ref: Names-Footnote-141444
+Node: This Manual41516
+Ref: This Manual-Footnote-146464
+Node: Conventions46564
+Node: Manual History48698
+Ref: Manual History-Footnote-151968
+Ref: Manual History-Footnote-252009
+Node: How To Contribute52083
+Node: Acknowledgments53227
+Node: Getting Started57558
+Node: Running gawk59937
+Node: One-shot61123
+Node: Read Terminal62348
+Ref: Read Terminal-Footnote-163998
+Ref: Read Terminal-Footnote-264274
+Node: Long64445
+Node: Executable Scripts65821
+Ref: Executable Scripts-Footnote-167690
+Ref: Executable Scripts-Footnote-267792
+Node: Comments68243
+Node: Quoting70710
+Node: DOS Quoting75333
+Node: Sample Data Files76008
+Node: Very Simple79040
+Node: Two Rules83639
+Node: More Complex85786
+Ref: More Complex-Footnote-188716
+Node: Statements/Lines88801
+Ref: Statements/Lines-Footnote-193263
+Node: Other Features93528
+Node: When94456
+Node: Invoking Gawk96603
+Node: Command Line97988
+Node: Options98771
+Ref: Options-Footnote-1111903
+Node: Other Arguments111928
+Node: Naming Standard Input114586
+Node: Environment Variables115680
+Node: AWKPATH Variable116124
+Ref: AWKPATH Variable-Footnote-1118721
+Node: Other Environment Variables118981
+Node: Exit Status121321
+Node: Include Files121996
+Node: Obsolete125481
+Node: Undocumented126167
+Node: Regexp126408
+Node: Regexp Usage127860
+Node: Escape Sequences129886
+Node: Regexp Operators135649
+Ref: Regexp Operators-Footnote-1142846
+Ref: Regexp Operators-Footnote-2142993
+Node: Bracket Expressions143091
+Ref: table-char-classes144894
+Node: GNU Regexp Operators147538
+Node: Case-sensitivity151261
+Ref: Case-sensitivity-Footnote-1154229
+Ref: Case-sensitivity-Footnote-2154464
+Node: Leftmost Longest154572
+Node: Computed Regexps155773
+Node: Locales159199
+Node: Reading Files162906
+Node: Records164847
+Ref: Records-Footnote-1173521
+Node: Fields173558
+Ref: Fields-Footnote-1176591
+Node: Nonconstant Fields176677
+Node: Changing Fields178879
+Node: Field Separators184857
+Node: Default Field Splitting187486
+Node: Regexp Field Splitting188603
+Node: Single Character Fields191945
+Node: Command Line Field Separator193004
+Node: Field Splitting Summary196445
+Ref: Field Splitting Summary-Footnote-1199637
+Node: Constant Size199738
+Node: Splitting By Content204322
+Ref: Splitting By Content-Footnote-1208048
+Node: Multiple Line208088
+Ref: Multiple Line-Footnote-1213935
+Node: Getline214114
+Node: Plain Getline216342
+Node: Getline/Variable218431
+Node: Getline/File219572
+Node: Getline/Variable/File220894
+Ref: Getline/Variable/File-Footnote-1222493
+Node: Getline/Pipe222580
+Node: Getline/Variable/Pipe225140
+Node: Getline/Coprocess226247
+Node: Getline/Variable/Coprocess227490
+Node: Getline Notes228204
+Node: Getline Summary230146
+Ref: table-getline-variants230489
+Node: Command line directories231345
+Node: Printing231970
+Node: Print233601
+Node: Print Examples234938
+Node: Output Separators237722
+Node: OFMT239482
+Node: Printf240840
+Node: Basic Printf241746
+Node: Control Letters243285
+Node: Format Modifiers247097
+Node: Printf Examples253106
+Node: Redirection255821
+Node: Special Files262805
+Node: Special FD263338
+Ref: Special FD-Footnote-1266962
+Node: Special Network267036
+Node: Special Caveats267886
+Node: Close Files And Pipes268682
+Ref: Close Files And Pipes-Footnote-1275705
+Ref: Close Files And Pipes-Footnote-2275853
+Node: Expressions276003
+Node: Values277072
+Node: Constants277748
+Node: Scalar Constants278428
+Ref: Scalar Constants-Footnote-1279287
+Node: Nondecimal-numbers279469
+Node: Regexp Constants282528
+Node: Using Constant Regexps283003
+Node: Variables286058
+Node: Using Variables286713
+Node: Assignment Options288437
+Node: Conversion290309
+Ref: table-locale-affects295685
+Ref: Conversion-Footnote-1296309
+Node: All Operators296418
+Node: Arithmetic Ops297048
+Node: Concatenation299553
+Ref: Concatenation-Footnote-1302346
+Node: Assignment Ops302466
+Ref: table-assign-ops307454
+Node: Increment Ops308862
+Node: Truth Values and Conditions312332
+Node: Truth Values313415
+Node: Typing and Comparison314464
+Node: Variable Typing315253
+Ref: Variable Typing-Footnote-1319150
+Node: Comparison Operators319272
+Ref: table-relational-ops319682
+Node: POSIX String Comparison323231
+Ref: POSIX String Comparison-Footnote-1324187
+Node: Boolean Ops324325
+Ref: Boolean Ops-Footnote-1328403
+Node: Conditional Exp328494
+Node: Function Calls330226
+Node: Precedence333820
+Node: Patterns and Actions337473
+Node: Pattern Overview338527
+Node: Regexp Patterns340193
+Node: Expression Patterns340736
+Node: Ranges344310
+Node: BEGIN/END347276
+Node: Using BEGIN/END348038
+Ref: Using BEGIN/END-Footnote-1350769
+Node: I/O And BEGIN/END350875
+Node: BEGINFILE/ENDFILE353157
+Node: Empty355988
+Node: Using Shell Variables356304
+Node: Action Overview358589
+Node: Statements360946
+Node: If Statement362800
+Node: While Statement364299
+Node: Do Statement366343
+Node: For Statement367499
+Node: Switch Statement370651
+Node: Break Statement372748
+Node: Continue Statement374738
+Node: Next Statement376525
+Node: Nextfile Statement378915
+Node: Exit Statement381212
+Node: Built-in Variables383628
+Node: User-modified384723
+Ref: User-modified-Footnote-1392749
+Node: Auto-set392811
+Ref: Auto-set-Footnote-1403553
+Node: ARGC and ARGV403758
+Node: Arrays407609
+Node: Array Basics409180
+Node: Array Intro409891
+Node: Reference to Elements414209
+Node: Assigning Elements416479
+Node: Array Example416970
+Node: Scanning an Array418702
+Node: Controlling Scanning421078
+Node: Delete424416
+Ref: Delete-Footnote-1426851
+Node: Numeric Array Subscripts426908
+Node: Uninitialized Subscripts429091
+Node: Multi-dimensional430719
+Node: Multi-scanning433810
+Node: Array Sorting435394
+Ref: Array Sorting-Footnote-1438488
+Node: Arrays of Arrays438682
+Node: Functions443255
+Node: Built-in444077
+Node: Calling Built-in445155
+Node: Numeric Functions447143
+Ref: Numeric Functions-Footnote-1450908
+Ref: Numeric Functions-Footnote-2451265
+Ref: Numeric Functions-Footnote-3451313
+Node: String Functions451582
+Ref: String Functions-Footnote-1474084
+Ref: String Functions-Footnote-2474213
+Ref: String Functions-Footnote-3474461
+Node: Gory Details474548
+Ref: table-sub-escapes476227
+Ref: table-posix-sub477541
+Ref: table-gensub-escapes478454
+Node: I/O Functions479625
+Ref: I/O Functions-Footnote-1486280
+Node: Time Functions486427
+Ref: Time Functions-Footnote-1497319
+Ref: Time Functions-Footnote-2497387
+Ref: Time Functions-Footnote-3497545
+Ref: Time Functions-Footnote-4497656
+Ref: Time Functions-Footnote-5497768
+Ref: Time Functions-Footnote-6497995
+Node: Bitwise Functions498261
+Ref: table-bitwise-ops498819
+Ref: Bitwise Functions-Footnote-1502979
+Node: Type Functions503163
+Node: I18N Functions503633
+Node: User-defined505260
+Node: Definition Syntax506064
+Ref: Definition Syntax-Footnote-1510974
+Node: Function Example511043
+Node: Function Caveats513637
+Node: Calling A Function514058
+Node: Variable Scope515173
+Node: Pass By Value/Reference517148
+Node: Return Statement520588
+Node: Dynamic Typing523569
+Node: Indirect Calls524304
+Node: Internationalization533989
+Node: I18N and L10N535415
+Node: Explaining gettext536101
+Ref: Explaining gettext-Footnote-1541167
+Ref: Explaining gettext-Footnote-2541351
+Node: Programmer i18n541516
+Node: Translator i18n545716
+Node: String Extraction546509
+Ref: String Extraction-Footnote-1547470
+Node: Printf Ordering547556
+Ref: Printf Ordering-Footnote-1550340
+Node: I18N Portability550404
+Ref: I18N Portability-Footnote-1552853
+Node: I18N Example552916
+Ref: I18N Example-Footnote-1555551
+Node: Gawk I18N555623
+Node: Advanced Features556240
+Node: Nondecimal Data557559
+Node: Two-way I/O559140
+Ref: Two-way I/O-Footnote-1564574
+Node: TCP/IP Networking564644
+Node: Profiling567488
+Node: Library Functions574962
+Ref: Library Functions-Footnote-1577969
+Node: Library Names578140
+Ref: Library Names-Footnote-1581611
+Ref: Library Names-Footnote-2581831
+Node: General Functions581917
+Node: Strtonum Function582870
+Node: Assert Function585800
+Node: Round Function589126
+Node: Cliff Random Function590669
+Node: Ordinal Functions591685
+Ref: Ordinal Functions-Footnote-1594755
+Ref: Ordinal Functions-Footnote-2595007
+Node: Join Function595216
+Ref: Join Function-Footnote-1596987
+Node: Gettimeofday Function597187
+Node: Data File Management600902
+Node: Filetrans Function601534
+Node: Rewind Function605673
+Node: File Checking607060
+Node: Empty Files608154
+Node: Ignoring Assigns610384
+Node: Getopt Function611937
+Ref: Getopt Function-Footnote-1623241
+Node: Passwd Functions623444
+Ref: Passwd Functions-Footnote-1632419
+Node: Group Functions632507
+Node: Walking Arrays640591
+Node: Sample Programs642160
+Node: Running Examples642825
+Node: Clones643553
+Node: Cut Program644777
+Node: Egrep Program654622
+Ref: Egrep Program-Footnote-1662395
+Node: Id Program662505
+Node: Split Program666121
+Ref: Split Program-Footnote-1669640
+Node: Tee Program669768
+Node: Uniq Program672571
+Node: Wc Program680000
+Ref: Wc Program-Footnote-1684266
+Ref: Wc Program-Footnote-2684466
+Node: Miscellaneous Programs684558
+Node: Dupword Program685746
+Node: Alarm Program687777
+Node: Translate Program692526
+Ref: Translate Program-Footnote-1696913
+Ref: Translate Program-Footnote-2697141
+Node: Labels Program697275
+Ref: Labels Program-Footnote-1700646
+Node: Word Sorting700730
+Node: History Sorting704614
+Node: Extract Program706453
+Ref: Extract Program-Footnote-1713936
+Node: Simple Sed714064
+Node: Igawk Program717126
+Ref: Igawk Program-Footnote-1732159
+Ref: Igawk Program-Footnote-2732360
+Node: Anagram Program732498
+Node: Signature Program735566
+Node: Debugger736666
+Node: Debugging737577
+Node: Debugging Concepts737990
+Node: Debugging Terms739846
+Node: Awk Debugging742468
+Node: Sample dgawk session743360
+Node: dgawk invocation743852
+Node: Finding The Bug745034
+Node: List of Debugger Commands751520
+Node: Breakpoint Control752831
+Node: Dgawk Execution Control756467
+Node: Viewing And Changing Data759818
+Node: Dgawk Stack763155
+Node: Dgawk Info764615
+Node: Miscellaneous Dgawk Commands768563
+Node: Readline Support773991
+Node: Dgawk Limitations774829
+Node: Language History777018
+Node: V7/SVR3.1778456
+Node: SVR4780777
+Node: POSIX782219
+Node: BTL783227
+Node: POSIX/GNU783961
+Node: Common Extensions789062
+Node: Contributors790163
+Node: Installation794302
+Node: Gawk Distribution795196
+Node: Getting795680
+Node: Extracting796506
+Node: Distribution contents798198
+Node: Unix Installation803420
+Node: Quick Installation804037
+Node: Additional Configuration Options805999
+Node: Configuration Philosophy807476
+Node: Non-Unix Installation809818
+Node: PC Installation810276
+Node: PC Binary Installation811575
+Node: PC Compiling813423
+Node: PC Testing816367
+Node: PC Using817543
+Node: Cygwin821728
+Node: MSYS822728
+Node: VMS Installation823242
+Node: VMS Compilation823845
+Ref: VMS Compilation-Footnote-1824852
+Node: VMS Installation Details824910
+Node: VMS Running826545
+Node: VMS Old Gawk828152
+Node: Bugs828626
+Node: Other Versions832536
+Node: Notes837815
+Node: Compatibility Mode838507
+Node: Additions839290
+Node: Accessing The Source840102
+Node: Adding Code841527
+Node: New Ports847494
+Node: Dynamic Extensions851607
+Node: Internals852983
+Node: Plugin License862086
+Node: Sample Library862720
+Node: Internal File Description863406
+Node: Internal File Ops867121
+Ref: Internal File Ops-Footnote-1871902
+Node: Using Internal File Ops872042
+Node: Future Extensions874419
+Node: Basic Concepts876923
+Node: Basic High Level877680
+Ref: Basic High Level-Footnote-1881715
+Node: Basic Data Typing881900
+Node: Floating Point Issues886425
+Node: String Conversion Precision887508
+Ref: String Conversion Precision-Footnote-1889202
+Node: Unexpected Results889311
+Node: POSIX Floating Point Problems891137
+Ref: POSIX Floating Point Problems-Footnote-1894839
+Node: Glossary894877
+Node: Copying919020
+Node: GNU Free Documentation License956577
+Node: Index981714

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 17df090e..2adad8be 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -560,8 +560,6 @@ particular records in a file and perform operations upon them.
* Library Names:: How to best name private global variables
in library functions.
* General Functions:: Functions that are of general use.
-* Nextfile Function:: Two implementations of a @code{nextfile}
- function.
* Strtonum Function:: A replacement for the built-in
@code{strtonum()} function.
* Assert Function:: A function for assertions in @command{awk}
@@ -12173,12 +12171,6 @@ reserved for closing files, pipes, and coprocesses that are
opened with redirections. It is not related to the main processing that
@command{awk} does with the files listed in @code{ARGV}.
-If it's necessary to use an @command{awk} version that doesn't support
-@code{nextfile}, see
-@ref{Nextfile Function},
-for a user-defined function that simulates the @code{nextfile}
-statement.
-
@cindex functions, user-defined, @code{next}/@code{nextfile} statements and
@cindex @code{nextfile} statement, user-defined functions and
The current version of the Brian Kernighan's @command{awk} (@pxref{Other
@@ -18991,8 +18983,6 @@ does not have a @file{/dev/stderr}, or if you cannot use @command{gawk}.
A number of programs use @code{nextfile}
(@pxref{Nextfile Statement})
to skip any remaining input in the input file.
-@ref{Nextfile Function},
-shows you how to write a function that does the same thing.
@item
@c 12/2000: Thanks to Nelson Beebe for pointing out the output issue.
@@ -19130,8 +19120,6 @@ This @value{SECTION} presents a number of functions that are of general
programming use.
@menu
-* Nextfile Function:: Two implementations of a @code{nextfile}
- function.
* Strtonum Function:: A replacement for the built-in
@code{strtonum()} function.
* Assert Function:: A function for assertions in @command{awk}
@@ -19145,138 +19133,6 @@ programming use.
* Gettimeofday Function:: A function to get formatted times.
@end menu
-@node Nextfile Function
-@subsection Implementing @code{nextfile} as a Function
-
-@cindex input files, skipping
-@c STARTOFRANGE libfnex
-@cindex libraries of @command{awk} functions, @code{nextfile} statement
-@c STARTOFRANGE flibnex
-@cindex functions, library, @code{nextfile} statement
-@c STARTOFRANGE nexim
-@cindex @code{nextfile} statement, implementing
-@cindex @command{gawk}, @code{nextfile} statement in
-The @code{nextfile} statement, presented in
-@ref{Nextfile Statement},
-is a @command{gawk}-specific extension---it is not available in most other
-implementations of @command{awk}. This @value{SECTION} shows two versions of a
-@code{nextfile()} function that you can use to simulate @command{gawk}'s
-@code{nextfile} statement if you cannot use @command{gawk}.
-
-A first attempt at writing a @code{nextfile()} function is as follows:
-
-@example
-# nextfile --- skip remaining records in current file
-# this should be read in before the "main" awk program
-
-function nextfile() @{ _abandon_ = FILENAME; next @}
-_abandon_ == FILENAME @{ next @}
-@end example
-
-@cindex programming conventions, @code{nextfile} statement
-Because it supplies a rule that must be executed first, this file should
-be included before the main program. This rule compares the current
-@value{DF}'s name (which is always in the @code{FILENAME} variable) to
-a private variable named @code{_abandon_}. If the @value{FN} matches,
-then the action part of the rule executes a @code{next} statement to
-go on to the next record. (The use of @samp{_} in the variable name is
-a convention. It is discussed more fully in
-@ref{Library Names}.)
-
-The use of the @code{next} statement effectively creates a loop that reads
-all the records from the current @value{DF}.
-The end of the file is eventually reached and
-a new @value{DF} is opened, changing the value of @code{FILENAME}.
-Once this happens, the comparison of @code{_abandon_} to @code{FILENAME}
-fails, and execution continues with the first rule of the ``real'' program.
-
-The @code{nextfile()} function itself simply sets the value of @code{_abandon_}
-and then executes a @code{next} statement to start the
-loop.
-@ignore
-@c If the function can't be used on other versions of awk, this whole
-@c section is pointless, no? Sigh.
-@footnote{@command{gawk} is the only known @command{awk} implementation
-that allows you to
-execute @code{next} from within a function body. Some other workaround
-is necessary if you are not using @command{gawk}.}
-@end ignore
-
-@cindex @code{nextfile()} user-defined function
-This initial version has a subtle problem.
-If the same @value{DF} is listed @emph{twice} on the command line,
-one right after the other
-or even with just a variable assignment between them,
-this code skips right through the file a second time, even though
-it should stop when it gets to the end of the first occurrence.
-A second version of @code{nextfile()} that remedies this problem
-is shown here:
-
-@example
-@c file eg/lib/nextfile.awk
-# nextfile --- skip remaining records in current file
-# correctly handle successive occurrences of the same file
-@c endfile
-@ignore
-@c file eg/lib/nextfile.awk
-#
-# Arnold Robbins, arnold@@skeeve.com, Public Domain
-# May, 1993
-
-@c endfile
-@end ignore
-@c file eg/lib/nextfile.awk
-# this should be read in before the "main" awk program
-
-function nextfile() @{ _abandon_ = FILENAME; next @}
-
-_abandon_ == FILENAME @{
- if (FNR == 1)
- _abandon_ = ""
- else
- next
-@}
-@c endfile
-@end example
-
-The @code{nextfile()} function has not changed. It makes @code{_abandon_}
-equal to the current @value{FN} and then executes a @code{next} statement.
-The @code{next} statement reads the next record and increments @code{FNR}
-so that @code{FNR} is guaranteed to have a value of at least two.
-However, if @code{nextfile()} is called for the last record in the file,
-then @command{awk} closes the current @value{DF} and moves on to the next
-one. Upon doing so, @code{FILENAME} is set to the name of the new file
-and @code{FNR} is reset to one. If this next file is the same as
-the previous one, @code{_abandon_} is still equal to @code{FILENAME}.
-However, @code{FNR} is equal to one, telling us that this is a new
-occurrence of the file and not the one we were reading when the
-@code{nextfile()} function was executed. In that case, @code{_abandon_}
-is reset to the empty string, so that further executions of this rule
-fail (until the next time that @code{nextfile()} is called).
-
-If @code{FNR} is not one, then we are still in the original @value{DF}
-and the program executes a @code{next} statement to skip through it.
-
-An important question to ask at this point is: given that the
-functionality of @code{nextfile} can be provided with a library file,
-why is it built into @command{gawk}? Adding
-features for little reason leads to larger, slower programs that are
-harder to maintain.
-The answer is that building @code{nextfile} into @command{gawk} provides
-significant gains in efficiency. If the @code{nextfile()} function is executed
-at the beginning of a large @value{DF}, @command{awk} still has to scan the entire
-file, splitting it up into records,
-@c at least conceptually
-just to skip over it. The built-in
-@code{nextfile} can simply close the file immediately and proceed to the
-next one, which saves a lot of time. This is particularly important in
-@command{awk}, because @command{awk} programs are generally I/O-bound (i.e.,
-they spend most of their time doing input and output, instead of performing
-computations).
-@c ENDOFRANGE libfnex
-@c ENDOFRANGE flibnex
-@c ENDOFRANGE nexim
-
@node Strtonum Function
@subsection Converting Strings To Numbers
@@ -19990,8 +19846,6 @@ again the value of multiple @code{BEGIN} and @code{END} rules should be clear.
@cindex @code{beginfile()} user-defined function
@cindex @code{endfile()} user-defined function
-This version has same problem as the first version of @code{nextfile()}
-(@pxref{Nextfile Function}).
If the same @value{DF} occurs twice in a row on the command line, then
@code{endfile()} and @code{beginfile()} are not executed at the end of the
first pass and at the beginning of the second pass.
@@ -20105,8 +19959,6 @@ or modify this code as appropriate.
The @code{rewind()} function also relies on the @code{nextfile} keyword
(@pxref{Nextfile Statement}).
-@xref{Nextfile Function},
-for a function version of @code{nextfile}.
@node File Checking
@subsection Checking for Readable @value{DDF}s