gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, feature/ns-include, updated. gawk-4.1.0-5580-g3beb847


From: Arnold Robbins
Subject: [SCM] gawk branch, feature/ns-include, updated. gawk-4.1.0-5580-g3beb8476
Date: Tue, 6 Aug 2024 14:07:28 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/ns-include has been updated
       via  3beb847617c0bf4ad8d5c6b993db2aff237e1a6b (commit)
      from  04abbb531e9a5c212d968b2c256990f6f9e402a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=3beb847617c0bf4ad8d5c6b993db2aff237e1a6b

commit 3beb847617c0bf4ad8d5c6b993db2aff237e1a6b
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Tue Aug 6 21:07:11 2024 +0300

    Add documentation for @nsinclude.

diff --git a/doc/ChangeLog b/doc/ChangeLog
index 10c1f48c..abe262ec 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2024-08-06         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * gawk.texi, gawk.1, awkcard.in: Document @nsinclude.
+
 2024-08-05         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawk.texi: Small consistency fix.
diff --git a/doc/awkcard.in b/doc/awkcard.in
index 8a22e1c2..11168455 100644
--- a/doc/awkcard.in
+++ b/doc/awkcard.in
@@ -2,7 +2,7 @@
 .\"
 .\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 .\" 2005, 2007, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018,
-.\" 2019, 2020, 2021, 2022, 2023
+.\" 2019, 2020, 2021, 2022, 2023, 2024
 .\" Free Software Foundation, Inc.
 .\" 
 .\" Permission is granted to make and distribute verbatim copies of
@@ -100,7 +100,7 @@ Variables  5\*(CX
 \*(CD
 .SL
 .nf
-\*(FRCopyright \(co 1996\(en2005, 2007, 2009\(en2023
+\*(FRCopyright \(co 1996\(en2005, 2007, 2009\(en2024
 Free Software Foundation, Inc.
 .nf
 .BT
@@ -441,6 +441,8 @@ pattern-action statements
 and optional function definitions.
 .sp .5
        \*(CB\*(FC@include "\*(FIfilename\*(FC"
+.br
+       \*(CB\*(FC@nsinclude "\*(FIfilename\*(FC"
 .br
        \*(FC@load "\*(FIfilename\*(FC"
 .br
@@ -450,20 +452,22 @@ and optional function definitions.
 .br
        \*(FCfunction \*(FIname\*(FC(\*(FIparameter list\*(FC) { 
\*(FIstatements\*(FC }\*(FR
 .sp .5
-\*(AK first reads the program source from the
+\*(AK reads the program source from the
 \*(FIprog-file\*(FR(s), if specified,
 \*(CBfrom arguments to \*(FC\-\^\-source\*(FR,\*(CD
-or from the first non-option argument on the command line.
-The program text is read as if all the \*(FIprog-file\*(FR(s)
+or from the first non-option argument.
+The program text is the concatenation of all the \*(FIprog-file\*(FR(s)
 \*(CBand command line
-source texts\*(CD had been concatenated.
+source texts\*(CD.
 .sp
 \*(CB\*(GK includes files named on \*(FC@include\*(FR lines.
 Nested includes are allowed.
+\*(FC@nsinclude\*(FR includes files but does not reset their
+namespace to \*(FCawk\*(FR.
 \*(GK loads extensions named on \*(FC@load\*(FR lines;
 see \fHDynamic Extensions\*(FR.\*(CD
 .sp .5
-AWK programs execute in the following order.
+AWK programs execute as follows:
 First, all variable assignments specified via the \*(FC\-v\fP
 option are performed.
 Next, \*(AK executes the code in the
@@ -474,7 +478,7 @@ If there are no files named on the command line,
 .sp .5
 A command line argument of the form
 \*(FIvar\*(FC=\*(FIval\*(FR,
-is treated as a variable assignment. The variable
+acts as a variable assignment. The variable
 \*(FIvar\fP is assigned the value \*(FIval\*(FR.
 (This happens after any \*(FCBEGIN\fP rule(s) have been run.)
 .sp .5
@@ -494,11 +498,11 @@ the \*(FIaction\*(FR associated with \*(FCENDFILE\fP 
after processing the file.\
 .sp .5
 For each record in the input, \*(AK tests to see if it matches any
 \*(FIpattern\fP in the AWK program.
-For each pattern that the record matches,
+For each match,
 it executes the associated \*(FIaction\fP.
-The patterns are tested in the order they occur in the program.
+Patterns are tested in the order they occur in the program.
 .sp .5
-Finally, after all the input is exhausted,
+Finally, after readnig all the input,
 \*(AK executes the code in the \*(FCEND\fP rule(s), if any.
 .sp .5
 If a program only has a \*(FCBEGIN\fP rule, no input files are processed.
@@ -2010,7 +2014,7 @@ maintains it.\*(CX
 .ES
 .fi
 \*(CDCopyright \(co 1996\(en2005,
-2007, 2009\(en2023 Free Software Foundation, Inc.
+2007, 2009\(en2024 Free Software Foundation, Inc.
 .sp .5   
 Permission is granted to make and distribute verbatim copies of this
 reference card provided the copyright notice and this permission notice
diff --git a/doc/gawk.1 b/doc/gawk.1
index 97cb4fab..c80e2746 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -13,7 +13,7 @@
 .              if \w'\(rq' .ds rq "\(rq
 .      \}
 .\}
-.TH GAWK 1 "Apr 24 2024" "Free Software Foundation" "Utility Commands"
+.TH GAWK 1 "Aug 02 2024" "Free Software Foundation" "Utility Commands"
 .SH NAME
 gawk \- pattern scanning and processing language
 .SH SYNOPSIS
@@ -379,6 +379,8 @@ and optional function definitions.
 .PP
 \fB@include "\fIfilename\^\fB"
 .br
+\fB@nsinclude "\fIfilename\^\fB"
+.br
 \fB@load "\fIfilename\^\fB"
 .br
 \fB@namespace "\fIname\^\fB"
@@ -415,6 +417,15 @@ to using the
 option.
 .PP
 Lines beginning with
+.B @nsinclude
+also include files, but with two differences.
+First, the namespace in the included file is
+.I not
+reset to the default of
+.BR awk ,
+and such files may be included multiple times.
+.PP
+Lines beginning with
 .B @load
 may be used to load extension functions into your program.  This is equivalent
 to using the
@@ -2272,7 +2283,9 @@ and
 .B \-\^\-include
 options, and the
 .B @include
-directive.  If the initial search fails, the path is searched again after
+and
+.B @nsinclude
+directives.  If the initial search fails, the path is searched again after
 appending
 .B \&.awk
 to the filename.
diff --git a/doc/gawk.info b/doc/gawk.info
index 644c33f4..4ddfc3a8 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -556,6 +556,8 @@ in (a) below.  A copy of the license is included in the 
section entitled
 * Naming Rules::                        Namespace and Component Naming Rules.
 * Internal Name Management::            How names are stored internally.
 * Namespace Example::                   An example of code using a namespace.
+* Inclusion For Namespaces::            Including a file without changing the
+                                        namespace.
 * Namespace And Features::              Namespaces and other ‘gawk’
                                         features.
 * Namespace Summary::                   Summarizing namespaces.
@@ -3365,7 +3367,8 @@ File: gawk.info,  Node: Include Files,  Next: Loading 
Shared Libraries,  Prev: E
 2.7 Including Other Files into Your Program
 ===========================================
 
-This minor node describes a feature that is specific to ‘gawk’.
+This minor node describes a feature that is specific to ‘gawk’.  It
+discusses how one source file may include another.
 
    The ‘@include’ keyword can be used to read external ‘awk’ source
 files.  This gives you the ability to split large ‘awk’ source files
@@ -3460,7 +3463,9 @@ Variable:: also apply to files loaded with ‘@include’.
 
    Finally, files included with ‘@include’ are treated as if they had
 ‘@namespace "awk"’ at their beginning.  *Note Changing The Namespace::,
-for more information.
+for more information.  However, there is a separate ‘@nsinclude’ command
+which does not change the namespace; see *note Inclusion For
+Namespaces::.
 
 
 File: gawk.info,  Node: Loading Shared Libraries,  Next: Obsolete,  Prev: 
Include Files,  Up: Invoking Gawk
@@ -24695,6 +24700,8 @@ This major node describes a feature that is specific to 
‘gawk’.
 * Naming Rules::                Namespace and Component Naming Rules.
 * Internal Name Management::    How names are stored internally.
 * Namespace Example::           An example of code using a namespace.
+* Inclusion For Namespaces::    Including a file without changing the
+                                namespace.
 * Namespace And Features::      Namespaces and other ‘gawk’ features.
 * Namespace Summary::           Summarizing namespaces.
 
@@ -24894,7 +24901,7 @@ For example:
      }
 
 
-File: gawk.info,  Node: Namespace Example,  Next: Namespace And Features,  
Prev: Internal Name Management,  Up: Namespaces
+File: gawk.info,  Node: Namespace Example,  Next: Inclusion For Namespaces,  
Prev: Internal Name Management,  Up: Namespaces
 
 15.7 Namespace Example
 ======================
@@ -24995,9 +25002,100 @@ unadorned identifiers are sought for in the ‘awk’ 
namespace:
      ...
 
 
-File: gawk.info,  Node: Namespace And Features,  Next: Namespace Summary,  
Prev: Namespace Example,  Up: Namespaces
+File: gawk.info,  Node: Inclusion For Namespaces,  Next: Namespace And 
Features,  Prev: Namespace Example,  Up: Namespaces
+
+15.8 Including A File Without Changing The Namespace
+====================================================
+
+As mentioned at the end of *note Include Files::, files included with
+‘@include’ are treated as if they had ‘@namespace "awk"’ at their
+beginning.  Sometimes, though, this behavior is undesirable.
+
+   Consider, for example, the case where you have some significant
+functions in one namespace:
+
+     @namespace "mylib"
+
+     function major_func1(a, b, c) { ... }
+     function major_func2(a, b, c) { ... }
+     ...
+
+From another namespace, you want to call these functions, frequently:
+
+     @namespace "myproj1"
+     function job1(a, b, c) {
+         ...
+         if (mylib::major_func1(a, b, c))
+             ...
+         else if (mylib::major_func2(a, b, c))
+             ...
+         ...
+     }
+     ... and so on ...
+
+Using the ‘mylib::’ prefix everywhere starts to get painful.
+
+   You might then try to write some “forwarding functions”, which you
+would ‘@include’ in each namespace.  For example, something like this in
+a file named ‘mylib_forward.awk’:
+
+     function major_func1(a, b, c)
+     {
+         return mylib::major_func1(a, b, c)
+     }
+
+     function major_func2(a, b, c)
+     {
+         return mylib::major_func2(a, b, c)
+     }
+
+   You might then try to ‘@include’ this file in each namespace:
+
+     @namespace "myproj1"
+     @include "mylib_forward.awk"
 
-15.8 Namespaces and Other ‘gawk’ Features
+     function job1(a, b, c) {
+         ...
+         if (major_func1(a, b, c))       # calls forwarding function
+             ...
+         else if (major_func2(a, b, c))  # ditto
+             ...
+         ...
+     }
+     ...
+
+     @namespace "myproj2"
+     @include "mylib_forward.awk"
+     ...
+
+But this won't work, since ‘@include’ resets the namespace to ‘awk’.
+
+   For this reason, ‘@nsinclude’ was added.  It works exactly the same
+as ‘@include’, but it does not change the namespace:
+
+     @namespace "myproj1"
+     @nsinclude "mylib_forward.awk"
+
+     function job1(a, b, c) {
+         ...
+         if (major_func1(a, b, c))       # calls forwarding function
+             ...
+         else if (major_func2(a, b, c))  # ditto
+             ...
+         ...
+     }
+     ...
+
+     @namespace "myproj2"
+     @nsinclude "mylib_forward.awk"
+     ...
+
+This will work the way we want it to.
+
+
+File: gawk.info,  Node: Namespace And Features,  Next: Namespace Summary,  
Prev: Inclusion For Namespaces,  Up: Namespaces
+
+15.9 Namespaces and Other ‘gawk’ Features
 =========================================
 
 This minor node looks briefly at how the namespace facility interacts
@@ -25027,8 +25125,8 @@ shared by cooperating ‘awk’ and C code.
 
 File: gawk.info,  Node: Namespace Summary,  Prev: Namespace And Features,  Up: 
Namespaces
 
-15.9 Summary
-============
+15.10 Summary
+=============
 
    • Standard ‘awk’ provides a single namespace for all global
      identifiers (scalars, arrays, and functions).  This is limiting
@@ -36353,13 +36451,15 @@ Index
 * {} (braces), statements, grouping:     Statements.          (line  10)
 * @ (at-sign), @-notation for indirect function calls: Indirect Calls.
                                                               (line  47)
-* @ (at-sign), @include directive:       Include Files.       (line   8)
+* @ (at-sign), @include directive:       Include Files.       (line   9)
 * @ (at-sign), @load directive:          Loading Shared Libraries.
                                                               (line   8)
 * @ (at-sign), @namespace directive:     Changing The Namespace.
                                                               (line   6)
 * @ (at-sign), @namespace directive, BEGIN, BEGINFILE, END, ENDFILE and: 
Changing The Namespace.
                                                               (line  37)
+* @ (at-sign), @nsinclude directive:     Inclusion For Namespaces.
+                                                              (line   6)
 * * (asterisk), * operator, as multiplication operator: Precedence.
                                                               (line  54)
 * * (asterisk), * operator, as regexp operator: Regexp Operator Details.
@@ -36685,13 +36785,15 @@ Index
 * asterisk (*), *= operator <1>:         Precedence.          (line  94)
 * at-sign (@), @-notation for indirect function calls: Indirect Calls.
                                                               (line  47)
-* at-sign (@), @include directive:       Include Files.       (line   8)
+* at-sign (@), @include directive:       Include Files.       (line   9)
 * at-sign (@), @load directive:          Loading Shared Libraries.
                                                               (line   8)
 * at-sign (@), @namespace directive:     Changing The Namespace.
                                                               (line   6)
 * at-sign (@), @namespace directive, BEGIN, BEGINFILE, END, ENDFILE and: 
Changing The Namespace.
                                                               (line  37)
+* at-sign (@), @nsinclude directive:     Inclusion For Namespaces.
+                                                              (line   6)
 * atan2:                                 Numeric Functions.   (line  11)
 * automatic displays, in debugger:       Debugger Info.       (line  24)
 * awf (amazingly workable formatter) program: Glossary.       (line  23)
@@ -36775,7 +36877,7 @@ Index
                                                               (line 186)
 * AWKLIBPATH environment variable <8>:   Shell Startup Files. (line   6)
 * AWKPATH environment variable:          AWKPATH Variable.    (line   6)
-* AWKPATH environment variable <1>:      Include Files.       (line   8)
+* AWKPATH environment variable <1>:      Include Files.       (line   9)
 * AWKPATH environment variable <2>:      Invoking Summary.    (line  49)
 * AWKPATH environment variable <3>:      Igawk Program.       (line  12)
 * AWKPATH environment variable <4>:      Igawk Program.       (line 211)
@@ -37651,7 +37753,7 @@ Index
                                                               (line 186)
 * environment variables, AWKLIBPATH <8>: Shell Startup Files. (line   6)
 * environment variables, AWKPATH:        AWKPATH Variable.    (line   6)
-* environment variables, AWKPATH <1>:    Include Files.       (line   8)
+* environment variables, AWKPATH <1>:    Include Files.       (line   9)
 * environment variables, AWKPATH <2>:    Invoking Summary.    (line  49)
 * environment variables, AWKPATH <3>:    Igawk Program.       (line  12)
 * environment variables, AWKPATH <4>:    Igawk Program.       (line 211)
@@ -37882,7 +37984,9 @@ Index
 * FIELDWIDTHS variable:                  Fixed width data.    (line  17)
 * FIELDWIDTHS variable <1>:              User-modified.       (line  37)
 * file descriptors:                      Special FD.          (line   6)
-* file inclusion, @include directive:    Include Files.       (line   8)
+* file inclusion, @include directive:    Include Files.       (line   9)
+* file inclusion, @nsinclude directive:  Inclusion For Namespaces.
+                                                              (line   6)
 * file names, assignments as:            Ignoring Assigns.    (line   6)
 * file names, distinguishing:            Auto-set.            (line  55)
 * file names, in compatibility mode:     Special Caveats.     (line   9)
@@ -38347,8 +38451,10 @@ Index
 * in operator, testing if array element exists: Reference to Elements.
                                                               (line  38)
 * in operator, use in loops:             Scanning an Array.   (line  17)
-* @include directive:                    Include Files.       (line   8)
-* including files, @include directive:   Include Files.       (line   8)
+* @include directive:                    Include Files.       (line   9)
+* including files, @include directive:   Include Files.       (line   9)
+* including files, @nsinclude directive: Inclusion For Namespaces.
+                                                              (line   6)
 * increment operators:                   Increment Ops.       (line   6)
 * index:                                 String Functions.    (line 174)
 * indexing arrays:                       Array Intro.         (line  51)
@@ -38718,6 +38824,8 @@ Index
 * NR variable:                           Records.             (line   6)
 * NR variable <1>:                       Auto-set.            (line 143)
 * NR variable, changing:                 Auto-set.            (line 415)
+* @nsinclude directive:                  Inclusion For Namespaces.
+                                                              (line   6)
 * null strings:                          awk split records.   (line 108)
 * null strings <1>:                      Regexp Field Splitting.
                                                               (line  42)
@@ -39892,628 +40000,629 @@ Index
 
 Tag Table:
 Node: Top1203
-Node: Foreword347032
-Node: Foreword451606
-Node: Preface53150
-Ref: Preface-Footnote-156136
-Ref: Preface-Footnote-256245
-Ref: Preface-Footnote-356479
-Node: History56625
-Node: Names59239
-Ref: Names-Footnote-160393
-Node: This Manual60556
-Ref: This Manual-Footnote-167486
-Node: Conventions67594
-Node: Manual History70023
-Ref: Manual History-Footnote-173048
-Ref: Manual History-Footnote-273089
-Node: How To Contribute73163
-Node: Acknowledgments74109
-Node: Getting Started79098
-Node: Running gawk81625
-Node: One-shot82843
-Node: Read Terminal84142
-Node: Long86196
-Node: Executable Scripts87846
-Ref: Executable Scripts-Footnote-190616
-Node: Comments90723
-Node: Quoting93253
-Node: DOS Quoting98897
-Node: Sample Data Files100977
-Node: Very Simple103612
-Node: Two Rules109866
-Node: More Complex111818
-Node: Statements/Lines114238
-Ref: Statements/Lines-Footnote-1119750
-Node: Other Features120039
-Node: When121007
-Ref: When-Footnote-1122809
-Node: Intro Summary122874
-Node: Invoking Gawk123828
-Node: Command Line125390
-Node: Options126240
-Ref: Options-Footnote-1145580
-Ref: Options-Footnote-2145815
-Node: Other Arguments145840
-Node: Naming Standard Input150005
-Node: Environment Variables151275
-Node: AWKPATH Variable151849
-Ref: AWKPATH Variable-Footnote-1155433
-Ref: AWKPATH Variable-Footnote-2155467
-Node: AWKLIBPATH Variable155858
-Ref: AWKLIBPATH Variable-Footnote-1157631
-Node: Other Environment Variables158026
-Node: Exit Status162502
-Node: Include Files163215
-Node: Loading Shared Libraries167267
-Node: Obsolete168757
-Node: Undocumented169505
-Node: Invoking Summary169802
-Node: Regexp172827
-Node: Regexp Usage174321
-Node: Escape Sequences176422
-Ref: Escape Sequences-Footnote-1183957
-Node: Regexp Operators184035
-Node: Regexp Operator Details184528
-Ref: Regexp Operator Details-Footnote-1192539
-Node: Interval Expressions192698
-Ref: Interval Expressions-Footnote-1194965
-Node: Bracket Expressions195063
-Ref: table-char-classes197619
-Node: Leftmost Longest201117
-Node: Computed Regexps202473
-Node: GNU Regexp Operators205988
-Node: Case-sensitivity211085
-Ref: Case-sensitivity-Footnote-1214035
-Ref: Case-sensitivity-Footnote-2214278
-Node: Regexp Summary214390
-Node: Reading Files215912
-Node: Records218231
-Node: awk split records219506
-Node: gawk split records224388
-Ref: gawk split records-Footnote-1229676
-Node: Fields229713
-Ref: Fields-Footnote-1232629
-Node: Nonconstant Fields232749
-Ref: Nonconstant Fields-Footnote-1235057
-Node: Changing Fields235273
-Node: Field Separators241571
-Node: Default Field Splitting244440
-Node: Regexp Field Splitting245582
-Node: Single Character Fields249411
-Node: Comma Separated Fields250500
-Ref: table-csv-examples251904
-Node: Command Line Field Separator254203
-Node: Full Line Fields257579
-Ref: Full Line Fields-Footnote-1259157
-Ref: Full Line Fields-Footnote-2259203
-Node: Field Splitting Summary259308
-Node: Constant Size261625
-Node: Fixed width data262369
-Node: Skipping intervening265884
-Node: Allowing trailing data266686
-Node: Fields with fixed data267747
-Node: Splitting By Content269369
-Ref: Splitting By Content-Footnote-1273819
-Node: More CSV273982
-Node: FS versus FPAT275640
-Node: Testing field creation276840
-Node: Multiple Line278614
-Node: Getline285083
-Node: Plain Getline287671
-Node: Getline/Variable290319
-Node: Getline/File291515
-Node: Getline/Variable/File292963
-Ref: Getline/Variable/File-Footnote-1294608
-Node: Getline/Pipe294704
-Node: Getline/Variable/Pipe297512
-Node: Getline/Coprocess298695
-Node: Getline/Variable/Coprocess300018
-Node: Getline Notes300784
-Node: Getline Summary304761
-Ref: table-getline-variants305205
-Node: Read Timeout306109
-Ref: Read Timeout-Footnote-1310071
-Node: Retrying Input310129
-Node: Command-line directories311396
-Node: Input Summary312334
-Node: Input Exercises315714
-Node: Printing316152
-Node: Print318095
-Node: Print Examples319596
-Node: Output Separators322441
-Node: OFMT324548
-Node: Printf326261
-Node: Basic Printf327066
-Node: Control Letters328701
-Node: Format Modifiers334147
-Node: Printf Examples340419
-Node: Redirection342960
-Node: Special FD350732
-Ref: Special FD-Footnote-1354030
-Node: Special Files354108
-Node: Other Inherited Files354737
-Node: Special Network355802
-Node: Special Caveats356690
-Node: Close Files And Pipes357673
-Ref: Close Files And Pipes-Footnote-1363797
-Node: Close Return Value363945
-Ref: table-close-pipe-return-values365216
-Ref: Close Return Value-Footnote-1366047
-Node: Noflush366203
-Node: Nonfatal367711
-Node: Output Summary370126
-Node: Output Exercises371412
-Node: Expressions372103
-Node: Values373303
-Node: Constants373981
-Node: Scalar Constants374676
-Ref: Scalar Constants-Footnote-1377252
-Ref: Scalar Constants-Footnote-2377502
-Node: Nondecimal-numbers377582
-Node: Regexp Constants380695
-Node: Using Constant Regexps381241
-Node: Standard Regexp Constants381887
-Node: Strong Regexp Constants385183
-Node: Variables389026
-Node: Using Variables389691
-Node: Assignment Options391665
-Node: Conversion394216
-Node: Strings And Numbers394748
-Ref: Strings And Numbers-Footnote-1397958
-Node: Locale influences conversions398067
-Ref: table-locale-affects400905
-Node: All Operators401547
-Node: Arithmetic Ops402188
-Node: Concatenation405011
-Ref: Concatenation-Footnote-1407947
-Node: Assignment Ops408066
-Ref: table-assign-ops413193
-Node: Increment Ops414574
-Node: Truth Values and Conditions418165
-Node: Truth Values419259
-Node: Typing and Comparison420339
-Node: Variable Typing421171
-Ref: Variable Typing-Footnote-1427815
-Ref: Variable Typing-Footnote-2427895
-Node: Comparison Operators427976
-Ref: table-relational-ops428403
-Node: POSIX String Comparison432079
-Ref: POSIX String Comparison-Footnote-1433836
-Ref: POSIX String Comparison-Footnote-2433979
-Node: Boolean Ops434063
-Ref: Boolean Ops-Footnote-1438737
-Node: Conditional Exp438833
-Node: Function Calls440613
-Node: Precedence444560
-Node: Locales448423
-Node: Expressions Summary450099
-Node: Patterns and Actions452754
-Node: Pattern Overview453890
-Node: Regexp Patterns455615
-Node: Expression Patterns456161
-Node: Ranges460066
-Node: BEGIN/END463240
-Node: Using BEGIN/END464049
-Ref: Using BEGIN/END-Footnote-1466957
-Node: I/O And BEGIN/END467067
-Node: BEGINFILE/ENDFILE469549
-Node: Empty472979
-Node: Using Shell Variables473296
-Node: Action Overview475632
-Node: Statements478068
-Node: If Statement479964
-Node: While Statement481527
-Node: Do Statement483615
-Node: For Statement484799
-Node: Switch Statement488154
-Node: Break Statement490703
-Node: Continue Statement492895
-Node: Next Statement494826
-Node: Nextfile Statement497305
-Node: Exit Statement500158
-Node: Built-in Variables502685
-Node: User-modified503862
-Node: Auto-set512069
-Ref: Auto-set-Footnote-1530153
-Ref: Auto-set-Footnote-2530371
-Node: ARGC and ARGV530427
-Node: Pattern Action Summary534856
-Node: Arrays537462
-Node: Array Basics538835
-Node: Array Intro539683
-Ref: figure-array-elements541694
-Ref: Array Intro-Footnote-1544547
-Node: Reference to Elements544679
-Node: Assigning Elements547199
-Node: Array Example547694
-Node: Scanning an Array549656
-Node: Controlling Scanning552751
-Ref: Controlling Scanning-Footnote-1559386
-Node: Numeric Array Subscripts559710
-Node: Uninitialized Subscripts561978
-Node: Delete563651
-Ref: Delete-Footnote-1566463
-Node: Multidimensional566520
-Node: Multiscanning569723
-Node: Arrays of Arrays571390
-Node: Arrays Summary575694
-Node: Functions577881
-Node: Built-in579013
-Node: Calling Built-in580202
-Node: Boolean Functions582242
-Node: Numeric Functions582804
-Ref: Numeric Functions-Footnote-1586989
-Ref: Numeric Functions-Footnote-2587672
-Ref: Numeric Functions-Footnote-3587724
-Node: String Functions588000
-Ref: String Functions-Footnote-1614451
-Ref: String Functions-Footnote-2614583
-Ref: String Functions-Footnote-3614839
-Node: Gory Details614926
-Ref: table-sub-escapes616935
-Ref: table-sub-proposed618566
-Ref: table-posix-sub620061
-Ref: table-gensub-escapes621734
-Ref: Gory Details-Footnote-1622653
-Node: I/O Functions622807
-Ref: table-system-return-values629483
-Ref: I/O Functions-Footnote-1631645
-Ref: I/O Functions-Footnote-2631793
-Node: Time Functions631913
-Ref: Time Functions-Footnote-1643625
-Ref: Time Functions-Footnote-2643693
-Ref: Time Functions-Footnote-3643855
-Ref: Time Functions-Footnote-4643966
-Ref: Time Functions-Footnote-5644082
-Ref: Time Functions-Footnote-6644309
-Node: Bitwise Functions644587
-Ref: table-bitwise-ops645185
-Ref: Bitwise Functions-Footnote-1651427
-Ref: Bitwise Functions-Footnote-2651604
-Node: Type Functions651799
-Node: I18N Functions653970
-Node: User-defined655705
-Node: Definition Syntax656451
-Ref: Definition Syntax-Footnote-1662269
-Node: Function Example662344
-Ref: Function Example-Footnote-1665323
-Node: Function Calling665345
-Node: Calling A Function665937
-Node: Variable Scope666907
-Node: Pass By Value/Reference669961
-Node: Function Caveats672689
-Ref: Function Caveats-Footnote-1674780
-Node: Return Statement674900
-Node: Dynamic Typing677932
-Node: Dynamic Typing Awk678510
-Node: Dynamic Typing Gawk680648
-Node: Indirect Calls684018
-Node: Functions Summary695155
-Node: Library Functions698121
-Ref: Library Functions-Footnote-1701669
-Ref: Library Functions-Footnote-2701814
-Node: Library Names701989
-Ref: Library Names-Footnote-1705760
-Ref: Library Names-Footnote-2705987
-Node: General Functions706081
-Node: Strtonum Function707351
-Node: Assert Function710433
-Node: Round Function713883
-Node: Cliff Random Function715455
-Node: Ordinal Functions716479
-Ref: Ordinal Functions-Footnote-1719582
-Ref: Ordinal Functions-Footnote-2719834
-Node: Join Function720048
-Ref: Join Function-Footnote-1721846
-Node: Getlocaltime Function722050
-Node: Readfile Function725824
-Node: Shell Quoting727853
-Node: Isnumeric Function729309
-Node: To CSV Function730745
-Node: Data File Management732837
-Node: Filetrans Function733469
-Node: Rewind Function737745
-Node: File Checking739716
-Ref: File Checking-Footnote-1741082
-Node: Empty Files741287
-Node: Ignoring Assigns743350
-Node: Getopt Function744924
-Ref: Getopt Function-Footnote-1760742
-Node: Passwd Functions760954
-Ref: Passwd Functions-Footnote-1770089
-Node: Group Functions770177
-Ref: Group Functions-Footnote-1778301
-Node: Walking Arrays778512
-Node: Library Functions Summary781558
-Node: Library Exercises782978
-Node: Sample Programs783463
-Node: Running Examples784245
-Node: Clones784997
-Node: Cut Program786265
-Node: Egrep Program796689
-Node: Id Program805994
-Node: Split Program816086
-Ref: Split Program-Footnote-1826299
-Node: Tee Program826484
-Node: Uniq Program829390
-Node: Wc Program837250
-Node: Bytes vs. Characters837645
-Node: Using extensions839245
-Node: wc program840023
-Node: Miscellaneous Programs845016
-Node: Dupword Program846241
-Node: Alarm Program848290
-Node: Translate Program853193
-Ref: Translate Program-Footnote-1857902
-Node: Labels Program858180
-Ref: Labels Program-Footnote-1861615
-Node: Word Sorting861699
-Node: History Sorting865873
-Node: Extract Program868146
-Node: Simple Sed876399
-Node: Igawk Program879609
-Ref: Igawk Program-Footnote-1894819
-Ref: Igawk Program-Footnote-2895025
-Ref: Igawk Program-Footnote-3895155
-Node: Anagram Program895282
-Node: Signature Program898368
-Node: Programs Summary899618
-Node: Programs Exercises900872
-Ref: Programs Exercises-Footnote-1905174
-Node: Advanced Features905260
-Node: Nondecimal Data907741
-Node: Boolean Typed Values909371
-Node: Array Sorting911328
-Node: Controlling Array Traversal912057
-Ref: Controlling Array Traversal-Footnote-1920560
-Node: Array Sorting Functions920682
-Ref: Array Sorting Functions-Footnote-1926779
-Node: Two-way I/O926987
-Ref: Two-way I/O-Footnote-1934958
-Ref: Two-way I/O-Footnote-2935149
-Node: TCP/IP Networking935231
-Node: Profiling938399
-Node: Persistent Memory948069
-Ref: Persistent Memory-Footnote-1957641
-Node: Extension Philosophy957772
-Node: Advanced Features Summary959299
-Node: Internationalization961565
-Node: I18N and L10N963267
-Node: Explaining gettext963962
-Ref: Explaining gettext-Footnote-1970098
-Ref: Explaining gettext-Footnote-2970291
-Node: Programmer i18n970456
-Ref: Programmer i18n-Footnote-1975568
-Node: Translator i18n975617
-Node: String Extraction976447
-Ref: String Extraction-Footnote-1977623
-Node: Printf Ordering977721
-Ref: Printf Ordering-Footnote-1980579
-Node: I18N Portability980647
-Ref: I18N Portability-Footnote-1983207
-Node: I18N Example983274
-Ref: I18N Example-Footnote-1986668
-Ref: I18N Example-Footnote-2986741
-Node: Gawk I18N986858
-Node: I18N Summary987512
-Node: Debugger988909
-Node: Debugging989929
-Node: Debugging Concepts990378
-Node: Debugging Terms992195
-Node: Awk Debugging994798
-Ref: Awk Debugging-Footnote-1995771
-Node: Sample Debugging Session995907
-Node: Debugger Invocation996457
-Node: Finding The Bug998082
-Node: List of Debugger Commands1004714
-Node: Breakpoint Control1006091
-Node: Debugger Execution Control1009913
-Node: Viewing And Changing Data1013387
-Node: Execution Stack1017121
-Node: Debugger Info1018802
-Node: Miscellaneous Debugger Commands1023097
-Node: Readline Support1028338
-Node: Limitations1029282
-Node: Debugging Summary1031906
-Node: Namespaces1033205
-Node: Global Namespace1034332
-Node: Qualified Names1035766
-Node: Default Namespace1036801
-Node: Changing The Namespace1037574
-Node: Naming Rules1039256
-Node: Internal Name Management1041211
-Node: Namespace Example1042281
-Node: Namespace And Features1044858
-Node: Namespace Summary1046313
-Node: Arbitrary Precision Arithmetic1047824
-Node: Computer Arithmetic1049343
-Ref: table-numeric-ranges1053268
-Ref: table-floating-point-ranges1053765
-Ref: Computer Arithmetic-Footnote-11054423
-Node: Math Definitions1054480
-Ref: table-ieee-formats1057512
-Node: MPFR features1058085
-Node: MPFR On Parole1058538
-Ref: MPFR On Parole-Footnote-11059379
-Node: MPFR Intro1059538
-Node: FP Math Caution1061222
-Ref: FP Math Caution-Footnote-11062294
-Node: Inexactness of computations1062667
-Node: Inexact representation1063698
-Node: Comparing FP Values1065079
-Node: Errors accumulate1066337
-Node: Strange values1067802
-Ref: Strange values-Footnote-11070456
-Node: Getting Accuracy1070561
-Node: Try To Round1073298
-Node: Setting precision1074205
-Ref: table-predefined-precision-strings1074910
-Node: Setting the rounding mode1076794
-Ref: table-gawk-rounding-modes1077176
-Ref: Setting the rounding mode-Footnote-11081228
-Node: Arbitrary Precision Integers1081411
-Ref: Arbitrary Precision Integers-Footnote-11084621
-Node: Checking for MPFR1084774
-Node: POSIX Floating Point Problems1086264
-Ref: POSIX Floating Point Problems-Footnote-11091084
-Node: Floating point summary1091122
-Node: Dynamic Extensions1093378
-Node: Extension Intro1094975
-Node: Plugin License1096277
-Node: Extension Mechanism Outline1097090
-Ref: figure-load-extension1097541
-Ref: figure-register-new-function1099119
-Ref: figure-call-new-function1100228
-Node: Extension API Description1102343
-Node: Extension API Functions Introduction1104072
-Ref: table-api-std-headers1105966
-Node: General Data Types1110407
-Ref: General Data Types-Footnote-11119553
-Node: Memory Allocation Functions1119856
-Ref: Memory Allocation Functions-Footnote-11124573
-Node: Constructor Functions1124672
-Node: API Ownership of MPFR and GMP Values1128573
-Node: Registration Functions1130126
-Node: Extension Functions1130830
-Node: Exit Callback Functions1136404
-Node: Extension Version String1137718
-Node: Input Parsers1138413
-Node: Output Wrappers1153032
-Node: Two-way processors1157874
-Node: Printing Messages1160227
-Ref: Printing Messages-Footnote-11161438
-Node: Updating ERRNO1161591
-Node: Requesting Values1162390
-Ref: table-value-types-returned1163143
-Node: Accessing Parameters1165202
-Node: Symbol Table Access1166483
-Node: Symbol table by name1166995
-Ref: Symbol table by name-Footnote-11170196
-Node: Symbol table by cookie1170328
-Ref: Symbol table by cookie-Footnote-11174597
-Node: Cached values1174661
-Ref: Cached values-Footnote-11178293
-Node: Array Manipulation1178450
-Ref: Array Manipulation-Footnote-11179549
-Node: Array Data Types1179586
-Ref: Array Data Types-Footnote-11182404
-Node: Array Functions1182500
-Node: Flattening Arrays1187529
-Node: Creating Arrays1194577
-Node: Redirection API1199419
-Node: Extension API Variables1202436
-Node: Extension Versioning1203159
-Ref: gawk-api-version1203588
-Node: Extension GMP/MPFR Versioning1205375
-Node: Extension API Informational Variables1207079
-Node: Extension API Boilerplate1208332
-Node: Changes from API V11212462
-Node: Finding Extensions1214094
-Node: Extension Example1214669
-Node: Internal File Description1215491
-Node: Internal File Ops1219783
-Ref: Internal File Ops-Footnote-11231333
-Node: Using Internal File Ops1231481
-Ref: Using Internal File Ops-Footnote-11233912
-Node: Extension Samples1234190
-Node: Extension Sample File Functions1235759
-Node: Extension Sample Fnmatch1243884
-Node: Extension Sample Fork1245479
-Node: Extension Sample Inplace1246755
-Node: Extension Sample Ord1250857
-Node: Extension Sample Readdir1251733
-Ref: table-readdir-file-types1252522
-Node: Extension Sample Revout1253878
-Node: Extension Sample Rev2way1254475
-Node: Extension Sample Read write array1255227
-Node: Extension Sample Readfile1258501
-Node: Extension Sample Time1259632
-Node: Extension Sample API Tests1261632
-Node: gawkextlib1262140
-Node: Extension summary1265172
-Node: Extension Exercises1269020
-Node: Language History1270290
-Node: V7/SVR3.11272002
-Node: SVR41274352
-Node: POSIX1275884
-Node: BTL1277309
-Node: POSIX/GNU1278076
-Ref: Gawk Extension Functions1281466
-Node: Feature History1284890
-Node: Common Extensions1304731
-Node: Ranges and Locales1306206
-Ref: Ranges and Locales-Footnote-11310991
-Ref: Ranges and Locales-Footnote-21311018
-Ref: Ranges and Locales-Footnote-31311253
-Node: Contributors1311476
-Node: History summary1317667
-Node: Installation1319109
-Node: Gawk Distribution1320073
-Node: Getting1320565
-Node: Extracting1321564
-Node: Distribution contents1323270
-Node: Unix Installation1331160
-Node: Quick Installation1331980
-Node: Compiling with MPFR1334520
-Node: Shell Startup Files1335226
-Node: Additional Configuration Options1336383
-Node: Configuration Philosophy1338766
-Node: Compiling from Git1341266
-Node: Building the Documentation1341825
-Node: Non-Unix Installation1343237
-Node: PC Installation1343713
-Node: PC Binary Installation1344582
-Node: PC Compiling1345475
-Node: PC Using1346653
-Node: Cygwin1350369
-Node: MSYS1351621
-Node: OpenVMS Installation1352247
-Node: OpenVMS Compilation1352928
-Ref: OpenVMS Compilation-Footnote-11354411
-Node: OpenVMS Dynamic Extensions1354469
-Node: OpenVMS Installation Details1356105
-Node: OpenVMS Running1358536
-Node: OpenVMS GNV1362673
-Node: Bugs1363428
-Node: Bug definition1364348
-Node: Bug address1367949
-Node: Usenet1371518
-Node: Performance bugs1372731
-Node: Asking for help1375735
-Node: Maintainers1377722
-Node: Other Versions1378749
-Node: Installation summary1388353
-Node: Notes1389735
-Node: Compatibility Mode1390545
-Node: Additions1391367
-Node: Accessing The Source1392312
-Node: Adding Code1393843
-Node: New Ports1400954
-Node: Derived Files1405457
-Ref: Derived Files-Footnote-11411268
-Ref: Derived Files-Footnote-21411303
-Ref: Derived Files-Footnote-31411914
-Node: Future Extensions1412028
-Node: Implementation Limitations1412698
-Node: Extension Design1413940
-Node: Old Extension Problems1415100
-Ref: Old Extension Problems-Footnote-11416672
-Node: Extension New Mechanism Goals1416733
-Ref: Extension New Mechanism Goals-Footnote-11420203
-Node: Extension Other Design Decisions1420404
-Node: Extension Future Growth1422601
-Node: Notes summary1423221
-Node: Basic Concepts1424431
-Node: Basic High Level1425116
-Ref: figure-general-flow1425398
-Ref: figure-process-flow1426100
-Ref: Basic High Level-Footnote-11429470
-Node: Basic Data Typing1429659
-Node: Glossary1433067
-Node: Copying1465945
-Node: GNU Free Documentation License1503503
-Node: Index1528626
+Node: Foreword347161
+Node: Foreword451735
+Node: Preface53279
+Ref: Preface-Footnote-156265
+Ref: Preface-Footnote-256374
+Ref: Preface-Footnote-356608
+Node: History56754
+Node: Names59368
+Ref: Names-Footnote-160522
+Node: This Manual60685
+Ref: This Manual-Footnote-167615
+Node: Conventions67723
+Node: Manual History70152
+Ref: Manual History-Footnote-173177
+Ref: Manual History-Footnote-273218
+Node: How To Contribute73292
+Node: Acknowledgments74238
+Node: Getting Started79227
+Node: Running gawk81754
+Node: One-shot82972
+Node: Read Terminal84271
+Node: Long86325
+Node: Executable Scripts87975
+Ref: Executable Scripts-Footnote-190745
+Node: Comments90852
+Node: Quoting93382
+Node: DOS Quoting99026
+Node: Sample Data Files101106
+Node: Very Simple103741
+Node: Two Rules109995
+Node: More Complex111947
+Node: Statements/Lines114367
+Ref: Statements/Lines-Footnote-1119879
+Node: Other Features120168
+Node: When121136
+Ref: When-Footnote-1122938
+Node: Intro Summary123003
+Node: Invoking Gawk123957
+Node: Command Line125519
+Node: Options126369
+Ref: Options-Footnote-1145709
+Ref: Options-Footnote-2145944
+Node: Other Arguments145969
+Node: Naming Standard Input150134
+Node: Environment Variables151404
+Node: AWKPATH Variable151978
+Ref: AWKPATH Variable-Footnote-1155562
+Ref: AWKPATH Variable-Footnote-2155596
+Node: AWKLIBPATH Variable155987
+Ref: AWKLIBPATH Variable-Footnote-1157760
+Node: Other Environment Variables158155
+Node: Exit Status162631
+Node: Include Files163344
+Node: Loading Shared Libraries167581
+Node: Obsolete169071
+Node: Undocumented169819
+Node: Invoking Summary170116
+Node: Regexp173141
+Node: Regexp Usage174635
+Node: Escape Sequences176736
+Ref: Escape Sequences-Footnote-1184271
+Node: Regexp Operators184349
+Node: Regexp Operator Details184842
+Ref: Regexp Operator Details-Footnote-1192853
+Node: Interval Expressions193012
+Ref: Interval Expressions-Footnote-1195279
+Node: Bracket Expressions195377
+Ref: table-char-classes197933
+Node: Leftmost Longest201431
+Node: Computed Regexps202787
+Node: GNU Regexp Operators206302
+Node: Case-sensitivity211399
+Ref: Case-sensitivity-Footnote-1214349
+Ref: Case-sensitivity-Footnote-2214592
+Node: Regexp Summary214704
+Node: Reading Files216226
+Node: Records218545
+Node: awk split records219820
+Node: gawk split records224702
+Ref: gawk split records-Footnote-1229990
+Node: Fields230027
+Ref: Fields-Footnote-1232943
+Node: Nonconstant Fields233063
+Ref: Nonconstant Fields-Footnote-1235371
+Node: Changing Fields235587
+Node: Field Separators241885
+Node: Default Field Splitting244754
+Node: Regexp Field Splitting245896
+Node: Single Character Fields249725
+Node: Comma Separated Fields250814
+Ref: table-csv-examples252218
+Node: Command Line Field Separator254517
+Node: Full Line Fields257893
+Ref: Full Line Fields-Footnote-1259471
+Ref: Full Line Fields-Footnote-2259517
+Node: Field Splitting Summary259622
+Node: Constant Size261939
+Node: Fixed width data262683
+Node: Skipping intervening266198
+Node: Allowing trailing data267000
+Node: Fields with fixed data268061
+Node: Splitting By Content269683
+Ref: Splitting By Content-Footnote-1274133
+Node: More CSV274296
+Node: FS versus FPAT275954
+Node: Testing field creation277154
+Node: Multiple Line278928
+Node: Getline285397
+Node: Plain Getline287985
+Node: Getline/Variable290633
+Node: Getline/File291829
+Node: Getline/Variable/File293277
+Ref: Getline/Variable/File-Footnote-1294922
+Node: Getline/Pipe295018
+Node: Getline/Variable/Pipe297826
+Node: Getline/Coprocess299009
+Node: Getline/Variable/Coprocess300332
+Node: Getline Notes301098
+Node: Getline Summary305075
+Ref: table-getline-variants305519
+Node: Read Timeout306423
+Ref: Read Timeout-Footnote-1310385
+Node: Retrying Input310443
+Node: Command-line directories311710
+Node: Input Summary312648
+Node: Input Exercises316028
+Node: Printing316466
+Node: Print318409
+Node: Print Examples319910
+Node: Output Separators322755
+Node: OFMT324862
+Node: Printf326575
+Node: Basic Printf327380
+Node: Control Letters329015
+Node: Format Modifiers334461
+Node: Printf Examples340733
+Node: Redirection343274
+Node: Special FD351046
+Ref: Special FD-Footnote-1354344
+Node: Special Files354422
+Node: Other Inherited Files355051
+Node: Special Network356116
+Node: Special Caveats357004
+Node: Close Files And Pipes357987
+Ref: Close Files And Pipes-Footnote-1364111
+Node: Close Return Value364259
+Ref: table-close-pipe-return-values365530
+Ref: Close Return Value-Footnote-1366361
+Node: Noflush366517
+Node: Nonfatal368025
+Node: Output Summary370440
+Node: Output Exercises371726
+Node: Expressions372417
+Node: Values373617
+Node: Constants374295
+Node: Scalar Constants374990
+Ref: Scalar Constants-Footnote-1377566
+Ref: Scalar Constants-Footnote-2377816
+Node: Nondecimal-numbers377896
+Node: Regexp Constants381009
+Node: Using Constant Regexps381555
+Node: Standard Regexp Constants382201
+Node: Strong Regexp Constants385497
+Node: Variables389340
+Node: Using Variables390005
+Node: Assignment Options391979
+Node: Conversion394530
+Node: Strings And Numbers395062
+Ref: Strings And Numbers-Footnote-1398272
+Node: Locale influences conversions398381
+Ref: table-locale-affects401219
+Node: All Operators401861
+Node: Arithmetic Ops402502
+Node: Concatenation405325
+Ref: Concatenation-Footnote-1408261
+Node: Assignment Ops408380
+Ref: table-assign-ops413507
+Node: Increment Ops414888
+Node: Truth Values and Conditions418479
+Node: Truth Values419573
+Node: Typing and Comparison420653
+Node: Variable Typing421485
+Ref: Variable Typing-Footnote-1428129
+Ref: Variable Typing-Footnote-2428209
+Node: Comparison Operators428290
+Ref: table-relational-ops428717
+Node: POSIX String Comparison432393
+Ref: POSIX String Comparison-Footnote-1434150
+Ref: POSIX String Comparison-Footnote-2434293
+Node: Boolean Ops434377
+Ref: Boolean Ops-Footnote-1439051
+Node: Conditional Exp439147
+Node: Function Calls440927
+Node: Precedence444874
+Node: Locales448737
+Node: Expressions Summary450413
+Node: Patterns and Actions453068
+Node: Pattern Overview454204
+Node: Regexp Patterns455929
+Node: Expression Patterns456475
+Node: Ranges460380
+Node: BEGIN/END463554
+Node: Using BEGIN/END464363
+Ref: Using BEGIN/END-Footnote-1467271
+Node: I/O And BEGIN/END467381
+Node: BEGINFILE/ENDFILE469863
+Node: Empty473293
+Node: Using Shell Variables473610
+Node: Action Overview475946
+Node: Statements478382
+Node: If Statement480278
+Node: While Statement481841
+Node: Do Statement483929
+Node: For Statement485113
+Node: Switch Statement488468
+Node: Break Statement491017
+Node: Continue Statement493209
+Node: Next Statement495140
+Node: Nextfile Statement497619
+Node: Exit Statement500472
+Node: Built-in Variables502999
+Node: User-modified504176
+Node: Auto-set512383
+Ref: Auto-set-Footnote-1530467
+Ref: Auto-set-Footnote-2530685
+Node: ARGC and ARGV530741
+Node: Pattern Action Summary535170
+Node: Arrays537776
+Node: Array Basics539149
+Node: Array Intro539997
+Ref: figure-array-elements542008
+Ref: Array Intro-Footnote-1544861
+Node: Reference to Elements544993
+Node: Assigning Elements547513
+Node: Array Example548008
+Node: Scanning an Array549970
+Node: Controlling Scanning553065
+Ref: Controlling Scanning-Footnote-1559700
+Node: Numeric Array Subscripts560024
+Node: Uninitialized Subscripts562292
+Node: Delete563965
+Ref: Delete-Footnote-1566777
+Node: Multidimensional566834
+Node: Multiscanning570037
+Node: Arrays of Arrays571704
+Node: Arrays Summary576008
+Node: Functions578195
+Node: Built-in579327
+Node: Calling Built-in580516
+Node: Boolean Functions582556
+Node: Numeric Functions583118
+Ref: Numeric Functions-Footnote-1587303
+Ref: Numeric Functions-Footnote-2587986
+Ref: Numeric Functions-Footnote-3588038
+Node: String Functions588314
+Ref: String Functions-Footnote-1614765
+Ref: String Functions-Footnote-2614897
+Ref: String Functions-Footnote-3615153
+Node: Gory Details615240
+Ref: table-sub-escapes617249
+Ref: table-sub-proposed618880
+Ref: table-posix-sub620375
+Ref: table-gensub-escapes622048
+Ref: Gory Details-Footnote-1622967
+Node: I/O Functions623121
+Ref: table-system-return-values629797
+Ref: I/O Functions-Footnote-1631959
+Ref: I/O Functions-Footnote-2632107
+Node: Time Functions632227
+Ref: Time Functions-Footnote-1643939
+Ref: Time Functions-Footnote-2644007
+Ref: Time Functions-Footnote-3644169
+Ref: Time Functions-Footnote-4644280
+Ref: Time Functions-Footnote-5644396
+Ref: Time Functions-Footnote-6644623
+Node: Bitwise Functions644901
+Ref: table-bitwise-ops645499
+Ref: Bitwise Functions-Footnote-1651741
+Ref: Bitwise Functions-Footnote-2651918
+Node: Type Functions652113
+Node: I18N Functions654284
+Node: User-defined656019
+Node: Definition Syntax656765
+Ref: Definition Syntax-Footnote-1662583
+Node: Function Example662658
+Ref: Function Example-Footnote-1665637
+Node: Function Calling665659
+Node: Calling A Function666251
+Node: Variable Scope667221
+Node: Pass By Value/Reference670275
+Node: Function Caveats673003
+Ref: Function Caveats-Footnote-1675094
+Node: Return Statement675214
+Node: Dynamic Typing678246
+Node: Dynamic Typing Awk678824
+Node: Dynamic Typing Gawk680962
+Node: Indirect Calls684332
+Node: Functions Summary695469
+Node: Library Functions698435
+Ref: Library Functions-Footnote-1701983
+Ref: Library Functions-Footnote-2702128
+Node: Library Names702303
+Ref: Library Names-Footnote-1706074
+Ref: Library Names-Footnote-2706301
+Node: General Functions706395
+Node: Strtonum Function707665
+Node: Assert Function710747
+Node: Round Function714197
+Node: Cliff Random Function715769
+Node: Ordinal Functions716793
+Ref: Ordinal Functions-Footnote-1719896
+Ref: Ordinal Functions-Footnote-2720148
+Node: Join Function720362
+Ref: Join Function-Footnote-1722160
+Node: Getlocaltime Function722364
+Node: Readfile Function726138
+Node: Shell Quoting728167
+Node: Isnumeric Function729623
+Node: To CSV Function731059
+Node: Data File Management733151
+Node: Filetrans Function733783
+Node: Rewind Function738059
+Node: File Checking740030
+Ref: File Checking-Footnote-1741396
+Node: Empty Files741601
+Node: Ignoring Assigns743664
+Node: Getopt Function745238
+Ref: Getopt Function-Footnote-1761056
+Node: Passwd Functions761268
+Ref: Passwd Functions-Footnote-1770403
+Node: Group Functions770491
+Ref: Group Functions-Footnote-1778615
+Node: Walking Arrays778826
+Node: Library Functions Summary781872
+Node: Library Exercises783292
+Node: Sample Programs783777
+Node: Running Examples784559
+Node: Clones785311
+Node: Cut Program786579
+Node: Egrep Program797003
+Node: Id Program806308
+Node: Split Program816400
+Ref: Split Program-Footnote-1826613
+Node: Tee Program826798
+Node: Uniq Program829704
+Node: Wc Program837564
+Node: Bytes vs. Characters837959
+Node: Using extensions839559
+Node: wc program840337
+Node: Miscellaneous Programs845330
+Node: Dupword Program846555
+Node: Alarm Program848604
+Node: Translate Program853507
+Ref: Translate Program-Footnote-1858216
+Node: Labels Program858494
+Ref: Labels Program-Footnote-1861929
+Node: Word Sorting862013
+Node: History Sorting866187
+Node: Extract Program868460
+Node: Simple Sed876713
+Node: Igawk Program879923
+Ref: Igawk Program-Footnote-1895133
+Ref: Igawk Program-Footnote-2895339
+Ref: Igawk Program-Footnote-3895469
+Node: Anagram Program895596
+Node: Signature Program898682
+Node: Programs Summary899932
+Node: Programs Exercises901186
+Ref: Programs Exercises-Footnote-1905488
+Node: Advanced Features905574
+Node: Nondecimal Data908055
+Node: Boolean Typed Values909685
+Node: Array Sorting911642
+Node: Controlling Array Traversal912371
+Ref: Controlling Array Traversal-Footnote-1920874
+Node: Array Sorting Functions920996
+Ref: Array Sorting Functions-Footnote-1927093
+Node: Two-way I/O927301
+Ref: Two-way I/O-Footnote-1935272
+Ref: Two-way I/O-Footnote-2935463
+Node: TCP/IP Networking935545
+Node: Profiling938713
+Node: Persistent Memory948383
+Ref: Persistent Memory-Footnote-1957955
+Node: Extension Philosophy958086
+Node: Advanced Features Summary959613
+Node: Internationalization961879
+Node: I18N and L10N963581
+Node: Explaining gettext964276
+Ref: Explaining gettext-Footnote-1970412
+Ref: Explaining gettext-Footnote-2970605
+Node: Programmer i18n970770
+Ref: Programmer i18n-Footnote-1975882
+Node: Translator i18n975931
+Node: String Extraction976761
+Ref: String Extraction-Footnote-1977937
+Node: Printf Ordering978035
+Ref: Printf Ordering-Footnote-1980893
+Node: I18N Portability980961
+Ref: I18N Portability-Footnote-1983521
+Node: I18N Example983588
+Ref: I18N Example-Footnote-1986982
+Ref: I18N Example-Footnote-2987055
+Node: Gawk I18N987172
+Node: I18N Summary987826
+Node: Debugger989223
+Node: Debugging990243
+Node: Debugging Concepts990692
+Node: Debugging Terms992509
+Node: Awk Debugging995112
+Ref: Awk Debugging-Footnote-1996085
+Node: Sample Debugging Session996221
+Node: Debugger Invocation996771
+Node: Finding The Bug998396
+Node: List of Debugger Commands1005028
+Node: Breakpoint Control1006405
+Node: Debugger Execution Control1010227
+Node: Viewing And Changing Data1013701
+Node: Execution Stack1017435
+Node: Debugger Info1019116
+Node: Miscellaneous Debugger Commands1023411
+Node: Readline Support1028652
+Node: Limitations1029596
+Node: Debugging Summary1032220
+Node: Namespaces1033519
+Node: Global Namespace1034759
+Node: Qualified Names1036193
+Node: Default Namespace1037228
+Node: Changing The Namespace1038001
+Node: Naming Rules1039683
+Node: Internal Name Management1041638
+Node: Namespace Example1042708
+Node: Inclusion For Namespaces1045287
+Node: Namespace And Features1047730
+Node: Namespace Summary1049192
+Node: Arbitrary Precision Arithmetic1050705
+Node: Computer Arithmetic1052224
+Ref: table-numeric-ranges1056149
+Ref: table-floating-point-ranges1056646
+Ref: Computer Arithmetic-Footnote-11057304
+Node: Math Definitions1057361
+Ref: table-ieee-formats1060393
+Node: MPFR features1060966
+Node: MPFR On Parole1061419
+Ref: MPFR On Parole-Footnote-11062260
+Node: MPFR Intro1062419
+Node: FP Math Caution1064103
+Ref: FP Math Caution-Footnote-11065175
+Node: Inexactness of computations1065548
+Node: Inexact representation1066579
+Node: Comparing FP Values1067960
+Node: Errors accumulate1069218
+Node: Strange values1070683
+Ref: Strange values-Footnote-11073337
+Node: Getting Accuracy1073442
+Node: Try To Round1076179
+Node: Setting precision1077086
+Ref: table-predefined-precision-strings1077791
+Node: Setting the rounding mode1079675
+Ref: table-gawk-rounding-modes1080057
+Ref: Setting the rounding mode-Footnote-11084109
+Node: Arbitrary Precision Integers1084292
+Ref: Arbitrary Precision Integers-Footnote-11087502
+Node: Checking for MPFR1087655
+Node: POSIX Floating Point Problems1089145
+Ref: POSIX Floating Point Problems-Footnote-11093965
+Node: Floating point summary1094003
+Node: Dynamic Extensions1096259
+Node: Extension Intro1097856
+Node: Plugin License1099158
+Node: Extension Mechanism Outline1099971
+Ref: figure-load-extension1100422
+Ref: figure-register-new-function1102000
+Ref: figure-call-new-function1103109
+Node: Extension API Description1105224
+Node: Extension API Functions Introduction1106953
+Ref: table-api-std-headers1108847
+Node: General Data Types1113288
+Ref: General Data Types-Footnote-11122434
+Node: Memory Allocation Functions1122737
+Ref: Memory Allocation Functions-Footnote-11127454
+Node: Constructor Functions1127553
+Node: API Ownership of MPFR and GMP Values1131454
+Node: Registration Functions1133007
+Node: Extension Functions1133711
+Node: Exit Callback Functions1139285
+Node: Extension Version String1140599
+Node: Input Parsers1141294
+Node: Output Wrappers1155913
+Node: Two-way processors1160755
+Node: Printing Messages1163108
+Ref: Printing Messages-Footnote-11164319
+Node: Updating ERRNO1164472
+Node: Requesting Values1165271
+Ref: table-value-types-returned1166024
+Node: Accessing Parameters1168083
+Node: Symbol Table Access1169364
+Node: Symbol table by name1169876
+Ref: Symbol table by name-Footnote-11173077
+Node: Symbol table by cookie1173209
+Ref: Symbol table by cookie-Footnote-11177478
+Node: Cached values1177542
+Ref: Cached values-Footnote-11181174
+Node: Array Manipulation1181331
+Ref: Array Manipulation-Footnote-11182430
+Node: Array Data Types1182467
+Ref: Array Data Types-Footnote-11185285
+Node: Array Functions1185381
+Node: Flattening Arrays1190410
+Node: Creating Arrays1197458
+Node: Redirection API1202300
+Node: Extension API Variables1205317
+Node: Extension Versioning1206040
+Ref: gawk-api-version1206469
+Node: Extension GMP/MPFR Versioning1208256
+Node: Extension API Informational Variables1209960
+Node: Extension API Boilerplate1211213
+Node: Changes from API V11215343
+Node: Finding Extensions1216975
+Node: Extension Example1217550
+Node: Internal File Description1218372
+Node: Internal File Ops1222664
+Ref: Internal File Ops-Footnote-11234214
+Node: Using Internal File Ops1234362
+Ref: Using Internal File Ops-Footnote-11236793
+Node: Extension Samples1237071
+Node: Extension Sample File Functions1238640
+Node: Extension Sample Fnmatch1246765
+Node: Extension Sample Fork1248360
+Node: Extension Sample Inplace1249636
+Node: Extension Sample Ord1253738
+Node: Extension Sample Readdir1254614
+Ref: table-readdir-file-types1255403
+Node: Extension Sample Revout1256759
+Node: Extension Sample Rev2way1257356
+Node: Extension Sample Read write array1258108
+Node: Extension Sample Readfile1261382
+Node: Extension Sample Time1262513
+Node: Extension Sample API Tests1264513
+Node: gawkextlib1265021
+Node: Extension summary1268053
+Node: Extension Exercises1271901
+Node: Language History1273171
+Node: V7/SVR3.11274883
+Node: SVR41277233
+Node: POSIX1278765
+Node: BTL1280190
+Node: POSIX/GNU1280957
+Ref: Gawk Extension Functions1284347
+Node: Feature History1287771
+Node: Common Extensions1307612
+Node: Ranges and Locales1309087
+Ref: Ranges and Locales-Footnote-11313872
+Ref: Ranges and Locales-Footnote-21313899
+Ref: Ranges and Locales-Footnote-31314134
+Node: Contributors1314357
+Node: History summary1320548
+Node: Installation1321990
+Node: Gawk Distribution1322954
+Node: Getting1323446
+Node: Extracting1324445
+Node: Distribution contents1326151
+Node: Unix Installation1334041
+Node: Quick Installation1334861
+Node: Compiling with MPFR1337401
+Node: Shell Startup Files1338107
+Node: Additional Configuration Options1339264
+Node: Configuration Philosophy1341647
+Node: Compiling from Git1344147
+Node: Building the Documentation1344706
+Node: Non-Unix Installation1346118
+Node: PC Installation1346594
+Node: PC Binary Installation1347463
+Node: PC Compiling1348356
+Node: PC Using1349534
+Node: Cygwin1353250
+Node: MSYS1354502
+Node: OpenVMS Installation1355128
+Node: OpenVMS Compilation1355809
+Ref: OpenVMS Compilation-Footnote-11357292
+Node: OpenVMS Dynamic Extensions1357350
+Node: OpenVMS Installation Details1358986
+Node: OpenVMS Running1361417
+Node: OpenVMS GNV1365554
+Node: Bugs1366309
+Node: Bug definition1367229
+Node: Bug address1370830
+Node: Usenet1374399
+Node: Performance bugs1375612
+Node: Asking for help1378616
+Node: Maintainers1380603
+Node: Other Versions1381630
+Node: Installation summary1391234
+Node: Notes1392616
+Node: Compatibility Mode1393426
+Node: Additions1394248
+Node: Accessing The Source1395193
+Node: Adding Code1396724
+Node: New Ports1403835
+Node: Derived Files1408338
+Ref: Derived Files-Footnote-11414149
+Ref: Derived Files-Footnote-21414184
+Ref: Derived Files-Footnote-31414795
+Node: Future Extensions1414909
+Node: Implementation Limitations1415579
+Node: Extension Design1416821
+Node: Old Extension Problems1417981
+Ref: Old Extension Problems-Footnote-11419553
+Node: Extension New Mechanism Goals1419614
+Ref: Extension New Mechanism Goals-Footnote-11423084
+Node: Extension Other Design Decisions1423285
+Node: Extension Future Growth1425482
+Node: Notes summary1426102
+Node: Basic Concepts1427312
+Node: Basic High Level1427997
+Ref: figure-general-flow1428279
+Ref: figure-process-flow1428981
+Ref: Basic High Level-Footnote-11432351
+Node: Basic Data Typing1432540
+Node: Glossary1435948
+Node: Copying1468826
+Node: GNU Free Documentation License1506384
+Node: Index1531507
 
 End Tag Table
 
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 00abf0a2..e7b8bb45 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -947,6 +947,8 @@ particular records in a file and perform operations upon 
them.
 * Naming Rules::                        Namespace and Component Naming Rules.
 * Internal Name Management::            How names are stored internally.
 * Namespace Example::                   An example of code using a namespace.
+* Inclusion For Namespaces::            Including a file without changing the
+                                        namespace.
 * Namespace And Features::              Namespaces and other @command{gawk}
                                         features.
 * Namespace Summary::                   Summarizing namespaces.
@@ -4958,11 +4960,12 @@ to @code{EXIT_FAILURE}.
 @c text for this section.
 
 This @value{SECTION} describes a feature that is specific to @command{gawk}.
+It discusses how one source file may include another.
 
 @cindex @code{@@} (at-sign) @subentry @code{@@include} directive
 @cindex at-sign (@code{@@}) @subentry @code{@@include} directive
-@cindex file inclusion, @code{@@include} directive
-@cindex including files, @code{@@include} directive
+@cindex file inclusion @subentry @code{@@include} directive
+@cindex including files @subentry @code{@@include} directive
 @cindex @code{@@include} directive @sortas{include directive}
 @cindex @env{AWKPATH} environment variable
 @cindex environment variables @subentry @env{AWKPATH}
@@ -5089,6 +5092,8 @@ apply to files loaded with @code{@@include}.
 Finally, files included with @code{@@include}
 are treated as if they had @samp{@@namespace "awk"}
 at their beginning.  @xref{Changing The Namespace}, for more information.
+However, there is a separate @code{@@nsinclude} command which
+does not change the namespace; see @ref{Inclusion For Namespaces}.
 
 @node Loading Shared Libraries
 @section Loading Dynamic Extensions into Your Program
@@ -33328,6 +33333,8 @@ please report them (@xref{Bugs}).
 * Naming Rules::                Namespace and Component Naming Rules.
 * Internal Name Management::    How names are stored internally.
 * Namespace Example::           An example of code using a namespace.
+* Inclusion For Namespaces::    Including a file without changing the
+                                namespace.
 * Namespace And Features::      Namespaces and other @command{gawk} features.
 * Namespace Summary::           Summarizing namespaces.
 @end menu
@@ -33692,6 +33699,116 @@ $ @kbd{gawk -f ns_passwd.awk -f testpasswd.awk}
 @dots{}
 @end example
 
+@node Inclusion For Namespaces
+@section Including A File Without Changing The Namespace
+
+@cindex @code{@@} (at-sign) @subentry @code{@@nsinclude} directive
+@cindex at-sign (@code{@@}) @subentry @code{@@nsinclude} directive
+@cindex file inclusion @subentry @code{@@nsinclude} directive
+@cindex including files @subentry @code{@@nsinclude} directive
+@cindex @code{@@nsinclude} directive @sortas{nsinclude directive}
+
+As mentioned at the end of @ref{Include Files}, files included with
+@code{@@include} are treated as if they had @samp{@@namespace "awk"}
+at their beginning.  Sometimes, though, this behavior is undesirable.
+
+Consider, for example, the case where you have some significant functions
+in one namespace:
+
+@example
+@@namespace "mylib"
+
+function major_func1(a, b, c) @{ @dots{} @}
+function major_func2(a, b, c) @{ @dots{} @}
+@dots{}
+@end example
+
+@noindent
+From another namespace, you want to call these functions,
+frequently:
+
+@example
+@@namespace "myproj1"
+function job1(a, b, c) @{
+    @dots{}
+    if (mylib::major_func1(a, b, c))
+        @dots{}
+    else if (mylib::major_func2(a, b, c))
+        @dots{}
+    @dots{}
+@}
+@dots{} @ii{and so on} @dots{}
+@end example
+
+@noindent
+Using the @samp{mylib::} prefix everywhere starts to get painful.
+
+You might then try to write some @dfn{forwarding functions}, which you
+would @code{@@include} in each namespace. For example, something
+like this in a file named @file{mylib_forward.awk}:
+
+@example
+function major_func1(a, b, c)
+@{
+    return mylib::major_func1(a, b, c)
+@}
+
+function major_func2(a, b, c)
+@{
+    return mylib::major_func2(a, b, c)
+@}
+@end example
+
+You might then try to @code{@@include} this file in each namespace:
+
+@example
+@@namespace "myproj1"
+@@include "mylib_forward.awk"
+
+function job1(a, b, c) @{
+    @dots{}
+    if (major_func1(a, b, c))       # calls forwarding function
+        @dots{}
+    else if (major_func2(a, b, c))  # ditto
+        @dots{}
+    @dots{}
+@}
+@dots{}
+
+@@namespace "myproj2"
+@@include "mylib_forward.awk"
+@dots{}
+@end example
+
+@noindent
+But this won't work, since @code{@@include} resets the namespace
+to @samp{awk}.
+
+For this reason, @code{@@nsinclude} was added. It works exactly
+the same as @code{@@include}, but it does not change the namespace:
+
+@example
+@@namespace "myproj1"
+@@nsinclude "mylib_forward.awk"
+
+function job1(a, b, c) @{
+    @dots{}
+    if (major_func1(a, b, c))       # calls forwarding function
+        @dots{}
+    else if (major_func2(a, b, c))  # ditto
+        @dots{}
+    @dots{}
+@}
+@dots{}
+
+@@namespace "myproj2"
+@@nsinclude "mylib_forward.awk"
+@dots{}
+@end example
+
+@noindent
+This will work the way we want it to.
+
 @node Namespace And Features
 @section Namespaces and Other @command{gawk} Features
 

-----------------------------------------------------------------------

Summary of changes:
 doc/ChangeLog  |    4 +
 doc/awkcard.in |   28 +-
 doc/gawk.1     |   17 +-
 doc/gawk.info  | 1381 ++++++++++++++++++++++++++++++--------------------------
 doc/gawk.texi  |  121 ++++-
 5 files changed, 899 insertions(+), 652 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]