[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5541-gda2e2e6f
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5541-gda2e2e6f |
Date: |
Thu, 10 Oct 2024 09:06:58 -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, gawk-5.3-stable has been updated
via da2e2e6f70cadab9a84c673fa45fdfe06150d9ce (commit)
via 066dba4456309243ff46a53627f021ef80422f1a (commit)
from a228c487b0c9c749023004f4e7237bcc6e340145 (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=da2e2e6f70cadab9a84c673fa45fdfe06150d9ce
commit da2e2e6f70cadab9a84c673fa45fdfe06150d9ce
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Thu Oct 10 15:30:31 2024 +0300
New doc section on shadowed variables.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 482cb3a4..4a3a0824 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,8 +1,13 @@
+2024-10-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi (Shadowed Variables): New section. Original
+ text contributed by John Naman, <gawker@gmail.com>.
+
2024-10-05 Arnold D. Robbins <arnold@skeeve.com>
* gawk.texi: Move @cindex lines to be before @enumerate /
- @itemize. Otherwise there are empty lines in the HTML.
- Thanks to Thérèse Godefroy <godef.th@free.fr> for the report.
+ @itemize. Thanks to Thérèse Godefroy <godef.th@free.fr>
+ for the report.
2024-09-17 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/doc/gawk.info b/doc/gawk.info
index 0082feb4..63831263 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -422,6 +422,7 @@ in (a) below. A copy of the license is included in the
section entitled
* Dynamic Typing Awk:: Dynamic typing in standard
âawkâ.
* Dynamic Typing Gawk:: Dynamic typing in âgawkâ.
+* Shadowed Variables:: More about shadowed global variables.
* Indirect Calls:: Choosing the function to call at
runtime.
* Functions Summary:: Summary of functions.
@@ -13143,6 +13144,7 @@ you determine at runtime what function is to be called.
* Built-in:: Summarizes the built-in functions.
* User-defined:: Describes User-defined functions in detail.
* Dynamic Typing:: How variable types can change at runtime.
+* Shadowed Variables:: More about shadowed global variables.
* Indirect Calls:: Choosing the function to call at runtime.
* Functions Summary:: Summary of functions.
@@ -15030,7 +15032,7 @@ in the rest of the program. The shadowed variables are
not accessible
in the function definition, because there is no way to name them while
their names have been taken away for the arguments and local variables.
All other variables used in the âawkâ program can be referenced or set
-normally in the function's body.
+normally in the function's body. (Also, *note Shadowed Variables::.)
The arguments and local variables last only as long as the function
body is executing. Once the body finishes, you can once again access
@@ -15539,7 +15541,7 @@ the program reports (predictably) that 99,385 is the
largest value in
the array.
-File: gawk.info, Node: Dynamic Typing, Next: Indirect Calls, Prev:
User-defined, Up: Functions
+File: gawk.info, Node: Dynamic Typing, Next: Shadowed Variables, Prev:
User-defined, Up: Functions
9.3 Variable Typing Is Dynamic
==============================
@@ -15735,9 +15737,64 @@ than in the standard manner of passing untyped
variables and array
elements as function parameters.
-File: gawk.info, Node: Indirect Calls, Next: Functions Summary, Prev:
Dynamic Typing, Up: Functions
+File: gawk.info, Node: Shadowed Variables, Next: Indirect Calls, Prev:
Dynamic Typing, Up: Functions
-9.4 Indirect Function Calls
+9.4 A Note On Shadowed Variables
+================================
+
+This minor node discusses some aspects of variable shadowing. Feel free
+to skip it upon first reading.
+
+ The "shadowing" concept is important to know for several reasons.
+
+_Name confusion_
+ Using global identifiers (names) locally can lead to very difficult
+ debugging, it complicates writing, reading and maintaining source
+ code, and it decreases the portability, (sharing or reuse) of a
+ library of âawkâ functions.
+
+_Preventing shadowing in functions_
+ It is a best practice to consistently use a naming convention, such
+ as "global variable and function names start with a capital letter
+ and local names begin with lowercase one." This also makes
+ programs easier to follow (*note Library Names::).
+
+_Circumventing shadow restrictions in functions_
+ The âgawkâ extension âSYMTABâ provides indirect access to global
+ variables that are or may be shadowed (see âSYMTABâ in *note
+ Auto-set::). For example:
+
+ ...
+ foo = "global value"
+ ...
+
+ function test(x, foo)
+ {
+ # use global value of foo as default
+ foo = (x > 0) ? SYMTAB["foo"] : "local value"
+ ...
+ }
+
+_Solving complex shadowing problems_
+ The âgawkâ namespace extension provides robust handling of
+ potential name collisions with global variables and functions
+ (*note Namespaces::). Namespaces are useful to prevent shadowing
+ by providing identifiers that are common to a group of functions
+ and effectively shadowed from being referenced by global functions
+ (See âFUNCTABâ in *note Auto-set::.)
+
+ Finally, a shadowing caveat: Variables local to a function are _not_
+"global" to anything. âSYMTABâ elements refer to all _global_ variables
+and arrays, but not to _local_ variables and arrays. If a function
+âA(argA, localA)â calls another function âB()â, the two variables local
+to âA()â are _not_ accessible in function âB()â or any other function.
+The global/local distinction is also important to remember when passing
+arguments to a function called indirectly (*note Indirect Calls::).
+
+
+File: gawk.info, Node: Indirect Calls, Next: Functions Summary, Prev:
Shadowed Variables, Up: Functions
+
+9.5 Indirect Function Calls
===========================
This minor node describes an advanced, âgawkâ-specific extension.
@@ -16050,7 +16107,7 @@ example, in the following case:
File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up:
Functions
-9.5 Summary
+9.6 Summary
===========
⢠âawkâ provides built-in functions and lets you define your own
@@ -31509,6 +31566,9 @@ Info file, in approximate chronological order:
⢠Efraim Yawitz contributed the original text for *note Debugger::.
+ ⢠John Naman contributed the original text for *note Shadowed
+ Variables::.
+
⢠The development of the extension API first released with âgawkâ 4.1
was driven primarily by Arnold Robbins and Andrew Schorr, with
notable contributions from the rest of the development team.
@@ -37109,7 +37169,7 @@ Index
* collating elements: Bracket Expressions. (line 90)
* collating symbols: Bracket Expressions. (line 97)
* Colombo, Antonio: Acknowledgments. (line 60)
-* Colombo, Antonio <1>: Contributors. (line 143)
+* Colombo, Antonio <1>: Contributors. (line 146)
* colon (:), :: namespace separator: Qualified Names. (line 6)
* colon (:), ?: operator: Precedence. (line 91)
* columns, aligning: Print Examples. (line 69)
@@ -37254,7 +37314,7 @@ Index
(line 6)
* CSVMODE library for gawk: More CSV. (line 52)
* ctime() user-defined function: Function Example. (line 74)
-* Curreli, Marco: Contributors. (line 147)
+* Curreli, Marco: Contributors. (line 150)
* currency symbols, localization: Explaining gettext. (line 104)
* current namespace, pushing and popping: Changing The Namespace.
(line 29)
@@ -38332,7 +38392,7 @@ Index
* gsub() function, arguments of: String Functions. (line 492)
* gsub() function, escape processing: Gory Details. (line 6)
* Guerrero, Juan Manuel: Acknowledgments. (line 60)
-* Guerrero, Juan Manuel <1>: Contributors. (line 150)
+* Guerrero, Juan Manuel <1>: Contributors. (line 153)
* h debugger command (alias for help): Miscellaneous Debugger Commands.
(line 67)
* Hankerson, Darrel: Acknowledgments. (line 60)
@@ -38484,7 +38544,7 @@ Index
* Jacobs, Andrew: Passwd Functions. (line 90)
* Jaegermann, Michal: Acknowledgments. (line 60)
* Jaegermann, Michal <1>: Contributors. (line 46)
-* Jannick: Contributors. (line 152)
+* Jannick: Contributors. (line 155)
* Java implementation of awk: Other Versions. (line 146)
* Java programming language: Glossary. (line 466)
* jawk: Other Versions. (line 146)
@@ -38637,7 +38697,7 @@ Index
* mailing labels, printing: Labels Program. (line 6)
* mailing list, GNITS: Acknowledgments. (line 52)
* Malmberg, John: Acknowledgments. (line 60)
-* Malmberg, John <1>: Contributors. (line 140)
+* Malmberg, John <1>: Contributors. (line 143)
* Malmberg, John <2>: Maintainers. (line 14)
* mark parity: Ordinal Functions. (line 45)
* marked string extraction (internationalization): String Extraction.
@@ -38692,6 +38752,7 @@ Index
* multiple-line records: Multiple Line. (line 6)
* n debugger command (alias for next): Debugger Execution Control.
(line 43)
+* Naman, John: Contributors. (line 136)
* name management: Internal Name Management.
(line 6)
* names, arrays/variables: Library Names. (line 6)
@@ -39311,7 +39372,7 @@ Index
* Robbins, Arnold <2>: Passwd Functions. (line 90)
* Robbins, Arnold <3>: Alarm Program. (line 6)
* Robbins, Arnold <4>: General Data Types. (line 6)
-* Robbins, Arnold <5>: Contributors. (line 154)
+* Robbins, Arnold <5>: Contributors. (line 157)
* Robbins, Arnold <6>: Maintainers. (line 14)
* Robbins, Arnold <7>: Future Extensions. (line 6)
* Robbins, Bill: Getline/Pipe. (line 40)
@@ -39358,7 +39419,7 @@ Index
* scanning multidimensional arrays: Multiscanning. (line 11)
* Schorr, Andrew: Acknowledgments. (line 60)
* Schorr, Andrew <1>: Auto-set. (line 386)
-* Schorr, Andrew <2>: Contributors. (line 136)
+* Schorr, Andrew <2>: Contributors. (line 139)
* Schreiber, Bert: Acknowledgments. (line 38)
* Schreiber, Rita: Acknowledgments. (line 38)
* search and replace in strings: String Functions. (line 98)
@@ -39951,628 +40012,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-1145582
-Ref: Options-Footnote-2145817
-Node: Other Arguments145842
-Node: Naming Standard Input150007
-Node: Environment Variables151277
-Node: AWKPATH Variable151851
-Ref: AWKPATH Variable-Footnote-1155435
-Ref: AWKPATH Variable-Footnote-2155469
-Node: AWKLIBPATH Variable155860
-Ref: AWKLIBPATH Variable-Footnote-1157635
-Node: Other Environment Variables158030
-Node: Exit Status162506
-Node: Include Files163219
-Node: Loading Shared Libraries167279
-Node: Obsolete168771
-Node: Undocumented169519
-Node: Invoking Summary169816
-Node: Regexp172841
-Node: Regexp Usage174335
-Node: Escape Sequences176436
-Ref: Escape Sequences-Footnote-1183971
-Node: Regexp Operators184049
-Node: Regexp Operator Details184542
-Ref: Regexp Operator Details-Footnote-1192553
-Node: Interval Expressions192712
-Ref: Interval Expressions-Footnote-1194979
-Node: Bracket Expressions195077
-Ref: table-char-classes197633
-Node: Leftmost Longest201131
-Node: Computed Regexps202487
-Node: GNU Regexp Operators206002
-Node: Case-sensitivity211099
-Ref: Case-sensitivity-Footnote-1214049
-Ref: Case-sensitivity-Footnote-2214292
-Node: Regexp Summary214404
-Node: Reading Files215926
-Node: Records218245
-Node: awk split records219520
-Node: gawk split records224402
-Ref: gawk split records-Footnote-1229690
-Node: Fields229727
-Ref: Fields-Footnote-1232643
-Node: Nonconstant Fields232763
-Ref: Nonconstant Fields-Footnote-1235071
-Node: Changing Fields235287
-Node: Field Separators241585
-Node: Default Field Splitting244454
-Node: Regexp Field Splitting245596
-Node: Single Character Fields249425
-Node: Comma Separated Fields250514
-Ref: table-csv-examples251918
-Node: Command Line Field Separator254217
-Node: Full Line Fields257593
-Ref: Full Line Fields-Footnote-1259171
-Ref: Full Line Fields-Footnote-2259217
-Node: Field Splitting Summary259322
-Node: Constant Size261639
-Node: Fixed width data262383
-Node: Skipping intervening265898
-Node: Allowing trailing data266700
-Node: Fields with fixed data267761
-Node: Splitting By Content269383
-Ref: Splitting By Content-Footnote-1273833
-Node: More CSV273996
-Node: FS versus FPAT275654
-Node: Testing field creation276854
-Node: Multiple Line278628
-Node: Getline285097
-Node: Plain Getline287685
-Node: Getline/Variable290333
-Node: Getline/File291529
-Node: Getline/Variable/File292977
-Ref: Getline/Variable/File-Footnote-1294622
-Node: Getline/Pipe294718
-Node: Getline/Variable/Pipe297526
-Node: Getline/Coprocess298709
-Node: Getline/Variable/Coprocess300032
-Node: Getline Notes300798
-Node: Getline Summary304775
-Ref: table-getline-variants305219
-Node: Read Timeout306123
-Ref: Read Timeout-Footnote-1310085
-Node: Retrying Input310143
-Node: Command-line directories311410
-Node: Input Summary312348
-Node: Input Exercises315728
-Node: Printing316166
-Node: Print318109
-Node: Print Examples319610
-Node: Output Separators322455
-Node: OFMT324562
-Node: Printf326275
-Node: Basic Printf327080
-Node: Control Letters328715
-Node: Format Modifiers334161
-Node: Printf Examples340433
-Node: Redirection342974
-Node: Special FD350746
-Ref: Special FD-Footnote-1354044
-Node: Special Files354122
-Node: Other Inherited Files354751
-Node: Special Network355816
-Node: Special Caveats356704
-Node: Close Files And Pipes357687
-Ref: Close Files And Pipes-Footnote-1363811
-Node: Close Return Value363959
-Ref: table-close-pipe-return-values365230
-Ref: Close Return Value-Footnote-1366061
-Node: Noflush366217
-Node: Nonfatal367725
-Node: Output Summary370140
-Node: Output Exercises371426
-Node: Expressions372117
-Node: Values373317
-Node: Constants373995
-Node: Scalar Constants374690
-Ref: Scalar Constants-Footnote-1377266
-Ref: Scalar Constants-Footnote-2377516
-Node: Nondecimal-numbers377596
-Node: Regexp Constants380709
-Node: Using Constant Regexps381255
-Node: Standard Regexp Constants381901
-Node: Strong Regexp Constants385197
-Node: Variables389040
-Node: Using Variables389705
-Node: Assignment Options391679
-Node: Conversion394230
-Node: Strings And Numbers394762
-Ref: Strings And Numbers-Footnote-1397972
-Node: Locale influences conversions398081
-Ref: table-locale-affects400919
-Node: All Operators401561
-Node: Arithmetic Ops402202
-Node: Concatenation405025
-Ref: Concatenation-Footnote-1407961
-Node: Assignment Ops408080
-Ref: table-assign-ops413207
-Node: Increment Ops414588
-Node: Truth Values and Conditions418179
-Node: Truth Values419273
-Node: Typing and Comparison420353
-Node: Variable Typing421185
-Ref: Variable Typing-Footnote-1427829
-Ref: Variable Typing-Footnote-2427909
-Node: Comparison Operators427990
-Ref: table-relational-ops428417
-Node: POSIX String Comparison432093
-Ref: POSIX String Comparison-Footnote-1433850
-Ref: POSIX String Comparison-Footnote-2433993
-Node: Boolean Ops434077
-Ref: Boolean Ops-Footnote-1438751
-Node: Conditional Exp438847
-Node: Function Calls440627
-Node: Precedence444574
-Node: Locales448437
-Node: Expressions Summary450113
-Node: Patterns and Actions452768
-Node: Pattern Overview453904
-Node: Regexp Patterns455629
-Node: Expression Patterns456175
-Node: Ranges460080
-Node: BEGIN/END463254
-Node: Using BEGIN/END464063
-Ref: Using BEGIN/END-Footnote-1466971
-Node: I/O And BEGIN/END467081
-Node: BEGINFILE/ENDFILE469563
-Node: Empty472993
-Node: Using Shell Variables473310
-Node: Action Overview475646
-Node: Statements478082
-Node: If Statement479978
-Node: While Statement481541
-Node: Do Statement483629
-Node: For Statement484813
-Node: Switch Statement488168
-Node: Break Statement490717
-Node: Continue Statement492909
-Node: Next Statement494840
-Node: Nextfile Statement497319
-Node: Exit Statement500172
-Node: Built-in Variables502699
-Node: User-modified503876
-Node: Auto-set512083
-Ref: Auto-set-Footnote-1530167
-Ref: Auto-set-Footnote-2530385
-Node: ARGC and ARGV530441
-Node: Pattern Action Summary534870
-Node: Arrays537476
-Node: Array Basics538849
-Node: Array Intro539697
-Ref: figure-array-elements541708
-Ref: Array Intro-Footnote-1544561
-Node: Reference to Elements544693
-Node: Assigning Elements547213
-Node: Array Example547708
-Node: Scanning an Array549670
-Node: Controlling Scanning552765
-Ref: Controlling Scanning-Footnote-1559400
-Node: Numeric Array Subscripts559724
-Node: Uninitialized Subscripts561992
-Node: Delete563665
-Ref: Delete-Footnote-1566477
-Node: Multidimensional566534
-Node: Multiscanning569737
-Node: Arrays of Arrays571404
-Node: Arrays Summary575708
-Node: Functions577895
-Node: Built-in579027
-Node: Calling Built-in580216
-Node: Boolean Functions582256
-Node: Numeric Functions582818
-Ref: Numeric Functions-Footnote-1587003
-Ref: Numeric Functions-Footnote-2587686
-Ref: Numeric Functions-Footnote-3587738
-Node: String Functions588014
-Ref: String Functions-Footnote-1614465
-Ref: String Functions-Footnote-2614597
-Ref: String Functions-Footnote-3614853
-Node: Gory Details614940
-Ref: table-sub-escapes616949
-Ref: table-sub-proposed618580
-Ref: table-posix-sub620075
-Ref: table-gensub-escapes621748
-Ref: Gory Details-Footnote-1622667
-Node: I/O Functions622821
-Ref: table-system-return-values629497
-Ref: I/O Functions-Footnote-1631659
-Ref: I/O Functions-Footnote-2631807
-Node: Time Functions631927
-Ref: Time Functions-Footnote-1643639
-Ref: Time Functions-Footnote-2643707
-Ref: Time Functions-Footnote-3643869
-Ref: Time Functions-Footnote-4643980
-Ref: Time Functions-Footnote-5644096
-Ref: Time Functions-Footnote-6644323
-Node: Bitwise Functions644601
-Ref: table-bitwise-ops645199
-Ref: Bitwise Functions-Footnote-1651441
-Ref: Bitwise Functions-Footnote-2651618
-Node: Type Functions651813
-Node: I18N Functions653984
-Node: User-defined655719
-Node: Definition Syntax656465
-Ref: Definition Syntax-Footnote-1662283
-Node: Function Example662358
-Ref: Function Example-Footnote-1665337
-Node: Function Calling665359
-Node: Calling A Function665951
-Node: Variable Scope666921
-Node: Pass By Value/Reference669975
-Node: Function Caveats672703
-Ref: Function Caveats-Footnote-1674794
-Node: Return Statement674914
-Node: Dynamic Typing677946
-Node: Dynamic Typing Awk678524
-Node: Dynamic Typing Gawk680662
-Node: Indirect Calls684032
-Node: Functions Summary695169
-Node: Library Functions698135
-Ref: Library Functions-Footnote-1701683
-Ref: Library Functions-Footnote-2701828
-Node: Library Names702003
-Ref: Library Names-Footnote-1705774
-Ref: Library Names-Footnote-2706001
-Node: General Functions706095
-Node: Strtonum Function707365
-Node: Assert Function710447
-Node: Round Function713897
-Node: Cliff Random Function715469
-Node: Ordinal Functions716493
-Ref: Ordinal Functions-Footnote-1719596
-Ref: Ordinal Functions-Footnote-2719848
-Node: Join Function720062
-Ref: Join Function-Footnote-1721860
-Node: Getlocaltime Function722064
-Node: Readfile Function725838
-Node: Shell Quoting727867
-Node: Isnumeric Function729323
-Node: To CSV Function730759
-Node: Data File Management732851
-Node: Filetrans Function733483
-Node: Rewind Function737759
-Node: File Checking739730
-Ref: File Checking-Footnote-1741096
-Node: Empty Files741301
-Node: Ignoring Assigns743364
-Node: Getopt Function744938
-Ref: Getopt Function-Footnote-1760756
-Node: Passwd Functions760968
-Ref: Passwd Functions-Footnote-1770103
-Node: Group Functions770191
-Ref: Group Functions-Footnote-1778315
-Node: Walking Arrays778526
-Node: Library Functions Summary781572
-Node: Library Exercises782992
-Node: Sample Programs783477
-Node: Running Examples784259
-Node: Clones785011
-Node: Cut Program786279
-Node: Egrep Program796703
-Node: Id Program806002
-Node: Split Program816094
-Ref: Split Program-Footnote-1826307
-Node: Tee Program826492
-Node: Uniq Program829398
-Node: Wc Program837258
-Node: Bytes vs. Characters837653
-Node: Using extensions839253
-Node: wc program840031
-Node: Miscellaneous Programs845024
-Node: Dupword Program846249
-Node: Alarm Program848298
-Node: Translate Program853201
-Ref: Translate Program-Footnote-1857910
-Node: Labels Program858188
-Ref: Labels Program-Footnote-1861623
-Node: Word Sorting861707
-Node: History Sorting865881
-Node: Extract Program868154
-Node: Simple Sed876407
-Node: Igawk Program879617
-Ref: Igawk Program-Footnote-1894827
-Ref: Igawk Program-Footnote-2895033
-Ref: Igawk Program-Footnote-3895163
-Node: Anagram Program895290
-Node: Signature Program898376
-Node: Programs Summary899626
-Node: Programs Exercises900880
-Ref: Programs Exercises-Footnote-1905709
-Node: Advanced Features905795
-Node: Nondecimal Data908276
-Node: Boolean Typed Values909906
-Node: Array Sorting911863
-Node: Controlling Array Traversal912592
-Ref: Controlling Array Traversal-Footnote-1921095
-Node: Array Sorting Functions921217
-Ref: Array Sorting Functions-Footnote-1927314
-Node: Two-way I/O927522
-Ref: Two-way I/O-Footnote-1935493
-Ref: Two-way I/O-Footnote-2935684
-Node: TCP/IP Networking935766
-Node: Profiling938934
-Node: Persistent Memory948604
-Ref: Persistent Memory-Footnote-1958176
-Node: Extension Philosophy958307
-Node: Advanced Features Summary959834
-Node: Internationalization962100
-Node: I18N and L10N963802
-Node: Explaining gettext964497
-Ref: Explaining gettext-Footnote-1970633
-Ref: Explaining gettext-Footnote-2970826
-Node: Programmer i18n970991
-Ref: Programmer i18n-Footnote-1976103
-Node: Translator i18n976152
-Node: String Extraction976982
-Ref: String Extraction-Footnote-1978158
-Node: Printf Ordering978256
-Ref: Printf Ordering-Footnote-1981114
-Node: I18N Portability981182
-Ref: I18N Portability-Footnote-1983742
-Node: I18N Example983809
-Ref: I18N Example-Footnote-1987203
-Ref: I18N Example-Footnote-2987276
-Node: Gawk I18N987393
-Node: I18N Summary988047
-Node: Debugger989444
-Node: Debugging990464
-Node: Debugging Concepts990913
-Node: Debugging Terms992730
-Node: Awk Debugging995333
-Ref: Awk Debugging-Footnote-1996306
-Node: Sample Debugging Session996442
-Node: Debugger Invocation996992
-Node: Finding The Bug998617
-Node: List of Debugger Commands1005249
-Node: Breakpoint Control1006626
-Node: Debugger Execution Control1010448
-Node: Viewing And Changing Data1013922
-Node: Execution Stack1017656
-Node: Debugger Info1019337
-Node: Miscellaneous Debugger Commands1023632
-Node: Readline Support1028873
-Node: Limitations1029817
-Node: Debugging Summary1032441
-Node: Namespaces1033740
-Node: Global Namespace1034867
-Node: Qualified Names1036301
-Node: Default Namespace1037336
-Node: Changing The Namespace1038109
-Node: Naming Rules1039791
-Node: Internal Name Management1041746
-Node: Namespace Example1042816
-Node: Namespace And Features1045393
-Node: Namespace Summary1046848
-Node: Arbitrary Precision Arithmetic1048359
-Node: Computer Arithmetic1049878
-Ref: table-numeric-ranges1053803
-Ref: table-floating-point-ranges1054300
-Ref: Computer Arithmetic-Footnote-11054958
-Node: Math Definitions1055015
-Ref: table-ieee-formats1058047
-Node: MPFR features1058620
-Node: MPFR On Parole1059073
-Ref: MPFR On Parole-Footnote-11059914
-Node: MPFR Intro1060073
-Node: FP Math Caution1061757
-Ref: FP Math Caution-Footnote-11062829
-Node: Inexactness of computations1063202
-Node: Inexact representation1064233
-Node: Comparing FP Values1065614
-Node: Errors accumulate1066872
-Node: Strange values1068337
-Ref: Strange values-Footnote-11070991
-Node: Getting Accuracy1071096
-Node: Try To Round1073833
-Node: Setting precision1074740
-Ref: table-predefined-precision-strings1075445
-Node: Setting the rounding mode1077329
-Ref: table-gawk-rounding-modes1077711
-Ref: Setting the rounding mode-Footnote-11081763
-Node: Arbitrary Precision Integers1081948
-Ref: Arbitrary Precision Integers-Footnote-11085158
-Node: Checking for MPFR1085311
-Node: POSIX Floating Point Problems1086801
-Ref: POSIX Floating Point Problems-Footnote-11091621
-Node: Floating point summary1091659
-Node: Dynamic Extensions1093915
-Node: Extension Intro1095512
-Node: Plugin License1096814
-Node: Extension Mechanism Outline1097627
-Ref: figure-load-extension1098078
-Ref: figure-register-new-function1099656
-Ref: figure-call-new-function1100765
-Node: Extension API Description1102880
-Node: Extension API Functions Introduction1104609
-Ref: table-api-std-headers1106503
-Node: General Data Types1110944
-Ref: General Data Types-Footnote-11120090
-Node: Memory Allocation Functions1120393
-Ref: Memory Allocation Functions-Footnote-11125110
-Node: Constructor Functions1125209
-Node: API Ownership of MPFR and GMP Values1129110
-Node: Registration Functions1130663
-Node: Extension Functions1131367
-Node: Exit Callback Functions1136941
-Node: Extension Version String1138255
-Node: Input Parsers1138950
-Node: Output Wrappers1153569
-Node: Two-way processors1158411
-Node: Printing Messages1160764
-Ref: Printing Messages-Footnote-11161975
-Node: Updating ERRNO1162128
-Node: Requesting Values1162927
-Ref: table-value-types-returned1163680
-Node: Accessing Parameters1165739
-Node: Symbol Table Access1167020
-Node: Symbol table by name1167532
-Ref: Symbol table by name-Footnote-11170733
-Node: Symbol table by cookie1170865
-Ref: Symbol table by cookie-Footnote-11175134
-Node: Cached values1175198
-Ref: Cached values-Footnote-11178830
-Node: Array Manipulation1178987
-Ref: Array Manipulation-Footnote-11180086
-Node: Array Data Types1180123
-Ref: Array Data Types-Footnote-11182941
-Node: Array Functions1183037
-Node: Flattening Arrays1188066
-Node: Creating Arrays1195114
-Node: Redirection API1199956
-Node: Extension API Variables1202973
-Node: Extension Versioning1203696
-Ref: gawk-api-version1204125
-Node: Extension GMP/MPFR Versioning1205912
-Node: Extension API Informational Variables1207616
-Node: Extension API Boilerplate1208869
-Node: Changes from API V11212999
-Node: Finding Extensions1214631
-Node: Extension Example1215206
-Node: Internal File Description1216028
-Node: Internal File Ops1220320
-Ref: Internal File Ops-Footnote-11231870
-Node: Using Internal File Ops1232018
-Ref: Using Internal File Ops-Footnote-11234451
-Node: Extension Samples1234729
-Node: Extension Sample File Functions1236298
-Node: Extension Sample Fnmatch1244423
-Node: Extension Sample Fork1246018
-Node: Extension Sample Inplace1247294
-Node: Extension Sample Ord1251396
-Node: Extension Sample Readdir1252272
-Ref: table-readdir-file-types1253061
-Node: Extension Sample Revout1254417
-Node: Extension Sample Rev2way1255014
-Node: Extension Sample Read write array1255766
-Node: Extension Sample Readfile1259040
-Node: Extension Sample Time1260171
-Node: Extension Sample API Tests1262171
-Node: gawkextlib1262679
-Node: Extension summary1265711
-Node: Extension Exercises1269559
-Node: Language History1270829
-Node: V7/SVR3.11272541
-Node: SVR41274891
-Node: POSIX1276423
-Node: BTL1277848
-Node: POSIX/GNU1278615
-Ref: Gawk Extension Functions1282005
-Node: Feature History1285429
-Node: Common Extensions1305270
-Node: Ranges and Locales1306745
-Ref: Ranges and Locales-Footnote-11311530
-Ref: Ranges and Locales-Footnote-21311557
-Ref: Ranges and Locales-Footnote-31311792
-Node: Contributors1312015
-Node: History summary1318206
-Node: Installation1319648
-Node: Gawk Distribution1320612
-Node: Getting1321104
-Node: Extracting1322103
-Node: Distribution contents1323809
-Node: Unix Installation1331699
-Node: Quick Installation1332519
-Node: Compiling with MPFR1335059
-Node: Shell Startup Files1335765
-Node: Additional Configuration Options1336922
-Node: Configuration Philosophy1339305
-Node: Compiling from Git1341805
-Node: Building the Documentation1342364
-Node: Non-Unix Installation1343776
-Node: PC Installation1344252
-Node: PC Binary Installation1345121
-Node: PC Compiling1346014
-Node: PC Using1347192
-Node: Cygwin1350908
-Node: MSYS1352160
-Node: OpenVMS Installation1352786
-Node: OpenVMS Compilation1353467
-Ref: OpenVMS Compilation-Footnote-11354950
-Node: OpenVMS Dynamic Extensions1355008
-Node: OpenVMS Installation Details1356644
-Node: OpenVMS Running1359075
-Node: OpenVMS GNV1363212
-Node: Bugs1363967
-Node: Bug definition1364887
-Node: Bug address1368488
-Node: Usenet1372057
-Node: Performance bugs1373270
-Node: Asking for help1376274
-Node: Maintainers1378261
-Node: Other Versions1379288
-Node: Installation summary1389277
-Node: Notes1390659
-Node: Compatibility Mode1391469
-Node: Additions1392291
-Node: Accessing The Source1393236
-Node: Adding Code1394767
-Node: New Ports1401878
-Node: Derived Files1406381
-Ref: Derived Files-Footnote-11412192
-Ref: Derived Files-Footnote-21412227
-Ref: Derived Files-Footnote-31412838
-Node: Future Extensions1412952
-Node: Implementation Limitations1413622
-Node: Extension Design1414864
-Node: Old Extension Problems1416024
-Ref: Old Extension Problems-Footnote-11417596
-Node: Extension New Mechanism Goals1417657
-Ref: Extension New Mechanism Goals-Footnote-11421127
-Node: Extension Other Design Decisions1421328
-Node: Extension Future Growth1423525
-Node: Notes summary1424145
-Node: Basic Concepts1425355
-Node: Basic High Level1426040
-Ref: figure-general-flow1426322
-Ref: figure-process-flow1427024
-Ref: Basic High Level-Footnote-11430394
-Node: Basic Data Typing1430583
-Node: Glossary1433991
-Node: Copying1466869
-Node: GNU Free Documentation License1504427
-Node: Index1529550
+Node: Foreword347110
+Node: Foreword451684
+Node: Preface53228
+Ref: Preface-Footnote-156214
+Ref: Preface-Footnote-256323
+Ref: Preface-Footnote-356557
+Node: History56703
+Node: Names59317
+Ref: Names-Footnote-160471
+Node: This Manual60634
+Ref: This Manual-Footnote-167564
+Node: Conventions67672
+Node: Manual History70101
+Ref: Manual History-Footnote-173126
+Ref: Manual History-Footnote-273167
+Node: How To Contribute73241
+Node: Acknowledgments74187
+Node: Getting Started79176
+Node: Running gawk81703
+Node: One-shot82921
+Node: Read Terminal84220
+Node: Long86274
+Node: Executable Scripts87924
+Ref: Executable Scripts-Footnote-190694
+Node: Comments90801
+Node: Quoting93331
+Node: DOS Quoting98975
+Node: Sample Data Files101055
+Node: Very Simple103690
+Node: Two Rules109944
+Node: More Complex111896
+Node: Statements/Lines114316
+Ref: Statements/Lines-Footnote-1119828
+Node: Other Features120117
+Node: When121085
+Ref: When-Footnote-1122887
+Node: Intro Summary122952
+Node: Invoking Gawk123906
+Node: Command Line125468
+Node: Options126318
+Ref: Options-Footnote-1145660
+Ref: Options-Footnote-2145895
+Node: Other Arguments145920
+Node: Naming Standard Input150085
+Node: Environment Variables151355
+Node: AWKPATH Variable151929
+Ref: AWKPATH Variable-Footnote-1155513
+Ref: AWKPATH Variable-Footnote-2155547
+Node: AWKLIBPATH Variable155938
+Ref: AWKLIBPATH Variable-Footnote-1157713
+Node: Other Environment Variables158108
+Node: Exit Status162584
+Node: Include Files163297
+Node: Loading Shared Libraries167357
+Node: Obsolete168849
+Node: Undocumented169597
+Node: Invoking Summary169894
+Node: Regexp172919
+Node: Regexp Usage174413
+Node: Escape Sequences176514
+Ref: Escape Sequences-Footnote-1184049
+Node: Regexp Operators184127
+Node: Regexp Operator Details184620
+Ref: Regexp Operator Details-Footnote-1192631
+Node: Interval Expressions192790
+Ref: Interval Expressions-Footnote-1195057
+Node: Bracket Expressions195155
+Ref: table-char-classes197711
+Node: Leftmost Longest201209
+Node: Computed Regexps202565
+Node: GNU Regexp Operators206080
+Node: Case-sensitivity211177
+Ref: Case-sensitivity-Footnote-1214127
+Ref: Case-sensitivity-Footnote-2214370
+Node: Regexp Summary214482
+Node: Reading Files216004
+Node: Records218323
+Node: awk split records219598
+Node: gawk split records224480
+Ref: gawk split records-Footnote-1229768
+Node: Fields229805
+Ref: Fields-Footnote-1232721
+Node: Nonconstant Fields232841
+Ref: Nonconstant Fields-Footnote-1235149
+Node: Changing Fields235365
+Node: Field Separators241663
+Node: Default Field Splitting244532
+Node: Regexp Field Splitting245674
+Node: Single Character Fields249503
+Node: Comma Separated Fields250592
+Ref: table-csv-examples251996
+Node: Command Line Field Separator254295
+Node: Full Line Fields257671
+Ref: Full Line Fields-Footnote-1259249
+Ref: Full Line Fields-Footnote-2259295
+Node: Field Splitting Summary259400
+Node: Constant Size261717
+Node: Fixed width data262461
+Node: Skipping intervening265976
+Node: Allowing trailing data266778
+Node: Fields with fixed data267839
+Node: Splitting By Content269461
+Ref: Splitting By Content-Footnote-1273911
+Node: More CSV274074
+Node: FS versus FPAT275732
+Node: Testing field creation276932
+Node: Multiple Line278706
+Node: Getline285175
+Node: Plain Getline287763
+Node: Getline/Variable290411
+Node: Getline/File291607
+Node: Getline/Variable/File293055
+Ref: Getline/Variable/File-Footnote-1294700
+Node: Getline/Pipe294796
+Node: Getline/Variable/Pipe297604
+Node: Getline/Coprocess298787
+Node: Getline/Variable/Coprocess300110
+Node: Getline Notes300876
+Node: Getline Summary304853
+Ref: table-getline-variants305297
+Node: Read Timeout306201
+Ref: Read Timeout-Footnote-1310163
+Node: Retrying Input310221
+Node: Command-line directories311488
+Node: Input Summary312426
+Node: Input Exercises315806
+Node: Printing316244
+Node: Print318187
+Node: Print Examples319688
+Node: Output Separators322533
+Node: OFMT324640
+Node: Printf326353
+Node: Basic Printf327158
+Node: Control Letters328793
+Node: Format Modifiers334239
+Node: Printf Examples340511
+Node: Redirection343052
+Node: Special FD350824
+Ref: Special FD-Footnote-1354122
+Node: Special Files354200
+Node: Other Inherited Files354829
+Node: Special Network355894
+Node: Special Caveats356782
+Node: Close Files And Pipes357765
+Ref: Close Files And Pipes-Footnote-1363889
+Node: Close Return Value364037
+Ref: table-close-pipe-return-values365308
+Ref: Close Return Value-Footnote-1366139
+Node: Noflush366295
+Node: Nonfatal367803
+Node: Output Summary370218
+Node: Output Exercises371504
+Node: Expressions372195
+Node: Values373395
+Node: Constants374073
+Node: Scalar Constants374768
+Ref: Scalar Constants-Footnote-1377344
+Ref: Scalar Constants-Footnote-2377594
+Node: Nondecimal-numbers377674
+Node: Regexp Constants380787
+Node: Using Constant Regexps381333
+Node: Standard Regexp Constants381979
+Node: Strong Regexp Constants385275
+Node: Variables389118
+Node: Using Variables389783
+Node: Assignment Options391757
+Node: Conversion394308
+Node: Strings And Numbers394840
+Ref: Strings And Numbers-Footnote-1398050
+Node: Locale influences conversions398159
+Ref: table-locale-affects400997
+Node: All Operators401639
+Node: Arithmetic Ops402280
+Node: Concatenation405103
+Ref: Concatenation-Footnote-1408039
+Node: Assignment Ops408158
+Ref: table-assign-ops413285
+Node: Increment Ops414666
+Node: Truth Values and Conditions418257
+Node: Truth Values419351
+Node: Typing and Comparison420431
+Node: Variable Typing421263
+Ref: Variable Typing-Footnote-1427907
+Ref: Variable Typing-Footnote-2427987
+Node: Comparison Operators428068
+Ref: table-relational-ops428495
+Node: POSIX String Comparison432171
+Ref: POSIX String Comparison-Footnote-1433928
+Ref: POSIX String Comparison-Footnote-2434071
+Node: Boolean Ops434155
+Ref: Boolean Ops-Footnote-1438829
+Node: Conditional Exp438925
+Node: Function Calls440705
+Node: Precedence444652
+Node: Locales448515
+Node: Expressions Summary450191
+Node: Patterns and Actions452846
+Node: Pattern Overview453982
+Node: Regexp Patterns455707
+Node: Expression Patterns456253
+Node: Ranges460158
+Node: BEGIN/END463332
+Node: Using BEGIN/END464141
+Ref: Using BEGIN/END-Footnote-1467049
+Node: I/O And BEGIN/END467159
+Node: BEGINFILE/ENDFILE469641
+Node: Empty473071
+Node: Using Shell Variables473388
+Node: Action Overview475724
+Node: Statements478160
+Node: If Statement480056
+Node: While Statement481619
+Node: Do Statement483707
+Node: For Statement484891
+Node: Switch Statement488246
+Node: Break Statement490795
+Node: Continue Statement492987
+Node: Next Statement494918
+Node: Nextfile Statement497397
+Node: Exit Statement500250
+Node: Built-in Variables502777
+Node: User-modified503954
+Node: Auto-set512161
+Ref: Auto-set-Footnote-1530245
+Ref: Auto-set-Footnote-2530463
+Node: ARGC and ARGV530519
+Node: Pattern Action Summary534948
+Node: Arrays537554
+Node: Array Basics538927
+Node: Array Intro539775
+Ref: figure-array-elements541786
+Ref: Array Intro-Footnote-1544639
+Node: Reference to Elements544771
+Node: Assigning Elements547291
+Node: Array Example547786
+Node: Scanning an Array549748
+Node: Controlling Scanning552843
+Ref: Controlling Scanning-Footnote-1559478
+Node: Numeric Array Subscripts559802
+Node: Uninitialized Subscripts562070
+Node: Delete563743
+Ref: Delete-Footnote-1566555
+Node: Multidimensional566612
+Node: Multiscanning569815
+Node: Arrays of Arrays571482
+Node: Arrays Summary575786
+Node: Functions577973
+Node: Built-in579175
+Node: Calling Built-in580364
+Node: Boolean Functions582404
+Node: Numeric Functions582966
+Ref: Numeric Functions-Footnote-1587151
+Ref: Numeric Functions-Footnote-2587834
+Ref: Numeric Functions-Footnote-3587886
+Node: String Functions588162
+Ref: String Functions-Footnote-1614613
+Ref: String Functions-Footnote-2614745
+Ref: String Functions-Footnote-3615001
+Node: Gory Details615088
+Ref: table-sub-escapes617097
+Ref: table-sub-proposed618728
+Ref: table-posix-sub620223
+Ref: table-gensub-escapes621896
+Ref: Gory Details-Footnote-1622815
+Node: I/O Functions622969
+Ref: table-system-return-values629645
+Ref: I/O Functions-Footnote-1631807
+Ref: I/O Functions-Footnote-2631955
+Node: Time Functions632075
+Ref: Time Functions-Footnote-1643787
+Ref: Time Functions-Footnote-2643855
+Ref: Time Functions-Footnote-3644017
+Ref: Time Functions-Footnote-4644128
+Ref: Time Functions-Footnote-5644244
+Ref: Time Functions-Footnote-6644471
+Node: Bitwise Functions644749
+Ref: table-bitwise-ops645347
+Ref: Bitwise Functions-Footnote-1651589
+Ref: Bitwise Functions-Footnote-2651766
+Node: Type Functions651961
+Node: I18N Functions654132
+Node: User-defined655867
+Node: Definition Syntax656613
+Ref: Definition Syntax-Footnote-1662468
+Node: Function Example662543
+Ref: Function Example-Footnote-1665522
+Node: Function Calling665544
+Node: Calling A Function666136
+Node: Variable Scope667106
+Node: Pass By Value/Reference670160
+Node: Function Caveats672888
+Ref: Function Caveats-Footnote-1674979
+Node: Return Statement675099
+Node: Dynamic Typing678131
+Node: Dynamic Typing Awk678713
+Node: Dynamic Typing Gawk680851
+Node: Shadowed Variables684221
+Node: Indirect Calls686569
+Node: Functions Summary697710
+Node: Library Functions700676
+Ref: Library Functions-Footnote-1704224
+Ref: Library Functions-Footnote-2704369
+Node: Library Names704544
+Ref: Library Names-Footnote-1708315
+Ref: Library Names-Footnote-2708542
+Node: General Functions708636
+Node: Strtonum Function709906
+Node: Assert Function712988
+Node: Round Function716438
+Node: Cliff Random Function718010
+Node: Ordinal Functions719034
+Ref: Ordinal Functions-Footnote-1722137
+Ref: Ordinal Functions-Footnote-2722389
+Node: Join Function722603
+Ref: Join Function-Footnote-1724401
+Node: Getlocaltime Function724605
+Node: Readfile Function728379
+Node: Shell Quoting730408
+Node: Isnumeric Function731864
+Node: To CSV Function733300
+Node: Data File Management735392
+Node: Filetrans Function736024
+Node: Rewind Function740300
+Node: File Checking742271
+Ref: File Checking-Footnote-1743637
+Node: Empty Files743842
+Node: Ignoring Assigns745905
+Node: Getopt Function747479
+Ref: Getopt Function-Footnote-1763297
+Node: Passwd Functions763509
+Ref: Passwd Functions-Footnote-1772644
+Node: Group Functions772732
+Ref: Group Functions-Footnote-1780856
+Node: Walking Arrays781067
+Node: Library Functions Summary784113
+Node: Library Exercises785533
+Node: Sample Programs786018
+Node: Running Examples786800
+Node: Clones787552
+Node: Cut Program788820
+Node: Egrep Program799244
+Node: Id Program808543
+Node: Split Program818635
+Ref: Split Program-Footnote-1828848
+Node: Tee Program829033
+Node: Uniq Program831939
+Node: Wc Program839799
+Node: Bytes vs. Characters840194
+Node: Using extensions841794
+Node: wc program842572
+Node: Miscellaneous Programs847565
+Node: Dupword Program848790
+Node: Alarm Program850839
+Node: Translate Program855742
+Ref: Translate Program-Footnote-1860451
+Node: Labels Program860729
+Ref: Labels Program-Footnote-1864164
+Node: Word Sorting864248
+Node: History Sorting868422
+Node: Extract Program870695
+Node: Simple Sed878948
+Node: Igawk Program882158
+Ref: Igawk Program-Footnote-1897368
+Ref: Igawk Program-Footnote-2897574
+Ref: Igawk Program-Footnote-3897704
+Node: Anagram Program897831
+Node: Signature Program900917
+Node: Programs Summary902167
+Node: Programs Exercises903421
+Ref: Programs Exercises-Footnote-1908250
+Node: Advanced Features908336
+Node: Nondecimal Data910817
+Node: Boolean Typed Values912447
+Node: Array Sorting914404
+Node: Controlling Array Traversal915133
+Ref: Controlling Array Traversal-Footnote-1923636
+Node: Array Sorting Functions923758
+Ref: Array Sorting Functions-Footnote-1929855
+Node: Two-way I/O930063
+Ref: Two-way I/O-Footnote-1938034
+Ref: Two-way I/O-Footnote-2938225
+Node: TCP/IP Networking938307
+Node: Profiling941475
+Node: Persistent Memory951145
+Ref: Persistent Memory-Footnote-1960717
+Node: Extension Philosophy960848
+Node: Advanced Features Summary962375
+Node: Internationalization964641
+Node: I18N and L10N966343
+Node: Explaining gettext967038
+Ref: Explaining gettext-Footnote-1973174
+Ref: Explaining gettext-Footnote-2973367
+Node: Programmer i18n973532
+Ref: Programmer i18n-Footnote-1978644
+Node: Translator i18n978693
+Node: String Extraction979523
+Ref: String Extraction-Footnote-1980699
+Node: Printf Ordering980797
+Ref: Printf Ordering-Footnote-1983655
+Node: I18N Portability983723
+Ref: I18N Portability-Footnote-1986283
+Node: I18N Example986350
+Ref: I18N Example-Footnote-1989744
+Ref: I18N Example-Footnote-2989817
+Node: Gawk I18N989934
+Node: I18N Summary990588
+Node: Debugger991985
+Node: Debugging993005
+Node: Debugging Concepts993454
+Node: Debugging Terms995271
+Node: Awk Debugging997874
+Ref: Awk Debugging-Footnote-1998847
+Node: Sample Debugging Session998983
+Node: Debugger Invocation999533
+Node: Finding The Bug1001158
+Node: List of Debugger Commands1007790
+Node: Breakpoint Control1009167
+Node: Debugger Execution Control1012989
+Node: Viewing And Changing Data1016463
+Node: Execution Stack1020197
+Node: Debugger Info1021878
+Node: Miscellaneous Debugger Commands1026173
+Node: Readline Support1031414
+Node: Limitations1032358
+Node: Debugging Summary1034982
+Node: Namespaces1036281
+Node: Global Namespace1037408
+Node: Qualified Names1038842
+Node: Default Namespace1039877
+Node: Changing The Namespace1040650
+Node: Naming Rules1042332
+Node: Internal Name Management1044287
+Node: Namespace Example1045357
+Node: Namespace And Features1047934
+Node: Namespace Summary1049389
+Node: Arbitrary Precision Arithmetic1050900
+Node: Computer Arithmetic1052419
+Ref: table-numeric-ranges1056344
+Ref: table-floating-point-ranges1056841
+Ref: Computer Arithmetic-Footnote-11057499
+Node: Math Definitions1057556
+Ref: table-ieee-formats1060588
+Node: MPFR features1061161
+Node: MPFR On Parole1061614
+Ref: MPFR On Parole-Footnote-11062455
+Node: MPFR Intro1062614
+Node: FP Math Caution1064298
+Ref: FP Math Caution-Footnote-11065370
+Node: Inexactness of computations1065743
+Node: Inexact representation1066774
+Node: Comparing FP Values1068155
+Node: Errors accumulate1069413
+Node: Strange values1070878
+Ref: Strange values-Footnote-11073532
+Node: Getting Accuracy1073637
+Node: Try To Round1076374
+Node: Setting precision1077281
+Ref: table-predefined-precision-strings1077986
+Node: Setting the rounding mode1079870
+Ref: table-gawk-rounding-modes1080252
+Ref: Setting the rounding mode-Footnote-11084304
+Node: Arbitrary Precision Integers1084489
+Ref: Arbitrary Precision Integers-Footnote-11087699
+Node: Checking for MPFR1087852
+Node: POSIX Floating Point Problems1089342
+Ref: POSIX Floating Point Problems-Footnote-11094162
+Node: Floating point summary1094200
+Node: Dynamic Extensions1096456
+Node: Extension Intro1098053
+Node: Plugin License1099355
+Node: Extension Mechanism Outline1100168
+Ref: figure-load-extension1100619
+Ref: figure-register-new-function1102197
+Ref: figure-call-new-function1103306
+Node: Extension API Description1105421
+Node: Extension API Functions Introduction1107150
+Ref: table-api-std-headers1109044
+Node: General Data Types1113485
+Ref: General Data Types-Footnote-11122631
+Node: Memory Allocation Functions1122934
+Ref: Memory Allocation Functions-Footnote-11127651
+Node: Constructor Functions1127750
+Node: API Ownership of MPFR and GMP Values1131651
+Node: Registration Functions1133204
+Node: Extension Functions1133908
+Node: Exit Callback Functions1139482
+Node: Extension Version String1140796
+Node: Input Parsers1141491
+Node: Output Wrappers1156110
+Node: Two-way processors1160952
+Node: Printing Messages1163305
+Ref: Printing Messages-Footnote-11164516
+Node: Updating ERRNO1164669
+Node: Requesting Values1165468
+Ref: table-value-types-returned1166221
+Node: Accessing Parameters1168280
+Node: Symbol Table Access1169561
+Node: Symbol table by name1170073
+Ref: Symbol table by name-Footnote-11173274
+Node: Symbol table by cookie1173406
+Ref: Symbol table by cookie-Footnote-11177675
+Node: Cached values1177739
+Ref: Cached values-Footnote-11181371
+Node: Array Manipulation1181528
+Ref: Array Manipulation-Footnote-11182627
+Node: Array Data Types1182664
+Ref: Array Data Types-Footnote-11185482
+Node: Array Functions1185578
+Node: Flattening Arrays1190607
+Node: Creating Arrays1197655
+Node: Redirection API1202497
+Node: Extension API Variables1205514
+Node: Extension Versioning1206237
+Ref: gawk-api-version1206666
+Node: Extension GMP/MPFR Versioning1208453
+Node: Extension API Informational Variables1210157
+Node: Extension API Boilerplate1211410
+Node: Changes from API V11215540
+Node: Finding Extensions1217172
+Node: Extension Example1217747
+Node: Internal File Description1218569
+Node: Internal File Ops1222861
+Ref: Internal File Ops-Footnote-11234411
+Node: Using Internal File Ops1234559
+Ref: Using Internal File Ops-Footnote-11236992
+Node: Extension Samples1237270
+Node: Extension Sample File Functions1238839
+Node: Extension Sample Fnmatch1246964
+Node: Extension Sample Fork1248559
+Node: Extension Sample Inplace1249835
+Node: Extension Sample Ord1253937
+Node: Extension Sample Readdir1254813
+Ref: table-readdir-file-types1255602
+Node: Extension Sample Revout1256958
+Node: Extension Sample Rev2way1257555
+Node: Extension Sample Read write array1258307
+Node: Extension Sample Readfile1261581
+Node: Extension Sample Time1262712
+Node: Extension Sample API Tests1264712
+Node: gawkextlib1265220
+Node: Extension summary1268252
+Node: Extension Exercises1272100
+Node: Language History1273370
+Node: V7/SVR3.11275082
+Node: SVR41277432
+Node: POSIX1278964
+Node: BTL1280389
+Node: POSIX/GNU1281156
+Ref: Gawk Extension Functions1284546
+Node: Feature History1287970
+Node: Common Extensions1307811
+Node: Ranges and Locales1309286
+Ref: Ranges and Locales-Footnote-11314071
+Ref: Ranges and Locales-Footnote-21314098
+Ref: Ranges and Locales-Footnote-31314333
+Node: Contributors1314556
+Node: History summary1320833
+Node: Installation1322275
+Node: Gawk Distribution1323239
+Node: Getting1323731
+Node: Extracting1324730
+Node: Distribution contents1326436
+Node: Unix Installation1334326
+Node: Quick Installation1335146
+Node: Compiling with MPFR1337686
+Node: Shell Startup Files1338392
+Node: Additional Configuration Options1339549
+Node: Configuration Philosophy1341932
+Node: Compiling from Git1344432
+Node: Building the Documentation1344991
+Node: Non-Unix Installation1346403
+Node: PC Installation1346879
+Node: PC Binary Installation1347748
+Node: PC Compiling1348641
+Node: PC Using1349819
+Node: Cygwin1353535
+Node: MSYS1354787
+Node: OpenVMS Installation1355413
+Node: OpenVMS Compilation1356094
+Ref: OpenVMS Compilation-Footnote-11357577
+Node: OpenVMS Dynamic Extensions1357635
+Node: OpenVMS Installation Details1359271
+Node: OpenVMS Running1361702
+Node: OpenVMS GNV1365839
+Node: Bugs1366594
+Node: Bug definition1367514
+Node: Bug address1371115
+Node: Usenet1374684
+Node: Performance bugs1375897
+Node: Asking for help1378901
+Node: Maintainers1380888
+Node: Other Versions1381915
+Node: Installation summary1391904
+Node: Notes1393286
+Node: Compatibility Mode1394096
+Node: Additions1394918
+Node: Accessing The Source1395863
+Node: Adding Code1397394
+Node: New Ports1404505
+Node: Derived Files1409008
+Ref: Derived Files-Footnote-11414819
+Ref: Derived Files-Footnote-21414854
+Ref: Derived Files-Footnote-31415465
+Node: Future Extensions1415579
+Node: Implementation Limitations1416249
+Node: Extension Design1417491
+Node: Old Extension Problems1418651
+Ref: Old Extension Problems-Footnote-11420223
+Node: Extension New Mechanism Goals1420284
+Ref: Extension New Mechanism Goals-Footnote-11423754
+Node: Extension Other Design Decisions1423955
+Node: Extension Future Growth1426152
+Node: Notes summary1426772
+Node: Basic Concepts1427982
+Node: Basic High Level1428667
+Ref: figure-general-flow1428949
+Ref: figure-process-flow1429651
+Ref: Basic High Level-Footnote-11433021
+Node: Basic Data Typing1433210
+Node: Glossary1436618
+Node: Copying1469496
+Node: GNU Free Documentation License1507054
+Node: Index1532177
End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 7a9c4c2e..4dd6b5c2 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -813,6 +813,7 @@ particular records in a file and perform operations upon
them.
* Dynamic Typing Awk:: Dynamic typing in standard
@command{awk}.
* Dynamic Typing Gawk:: Dynamic typing in @command{gawk}.
+* Shadowed Variables:: More about shadowed global variables.
* Indirect Calls:: Choosing the function to call at
runtime.
* Functions Summary:: Summary of functions.
@@ -18011,6 +18012,7 @@ be called.
* Built-in:: Summarizes the built-in functions.
* User-defined:: Describes User-defined functions in detail.
* Dynamic Typing:: How variable types can change at runtime.
+* Shadowed Variables:: More about shadowed global variables.
* Indirect Calls:: Choosing the function to call at runtime.
* Functions Summary:: Summary of functions.
@end menu
@@ -20670,6 +20672,7 @@ function definition, because there is no way to name
them while their
names have been taken away for the arguments and local variables. All other
variables
used in the @command{awk} program can be referenced or set normally in the
function's body.
+(Also, @pxref{Shadowed Variables}.)
The arguments and local variables last only as long as the function body
is executing. Once the body finishes, you can once again access the
@@ -21497,6 +21500,65 @@ best to avoid taking advantage of @command{gawk}'s
dynamic nature, other
than in the standard manner of passing untyped variables and array
elements as function parameters.
+@node Shadowed Variables
+@section A Note On Shadowed Variables
+
+@c Contributed by John Naman <gawker@gmail.com>, October 2024
+
+This @value{SECTION} discusses some aspects of variable shadowing.
+Feel free to skip it upon first reading.
+
+The ``shadowing'' concept is important to know for several reasons.
+
+@table @emph
+@item Name confusion
+Using global identifiers (names) locally can lead to very difficult
+debugging, it complicates writing, reading and maintaining source code,
+and it decreases the portability, (sharing or reuse) of a library of
+@command{awk} functions.
+
+@item Preventing shadowing in functions
+It is a best practice to consistently use a naming convention,
+such as ``global variable and function names start with a capital letter
+and local names begin with lowercase one.'' This also makes programs
+easier to follow (@pxref{Library Names}).
+
+@item Circumventing shadow restrictions in functions
+The @command{gawk} extension @code{SYMTAB} provides indirect access
+to global variables that are or may be shadowed (see @code{SYMTAB}
+in @ref{Auto-set}). For example:
+
+@example
+@dots{}
+foo = "global value"
+@dots{}
+
+function test(x, foo)
+@{
+ # use global value of foo as default
+ foo = (x > 0) ? SYMTAB["foo"] : "local value"
+ @dots{}
+@}
+@end example
+
+@item Solving complex shadowing problems
+The @command{gawk} namespace extension
+provides robust handling of potential name collisions with global
+variables and functions (@pxref{Namespaces}). Namespaces
+are useful to prevent shadowing by providing identifiers that are
+common to a group of functions and effectively shadowed from being
+referenced by global functions (See @code{FUNCTAB} in @ref{Auto-set}.)
+@end table
+
+Finally, a shadowing caveat: Variables local to a function are @emph{not}
+``global'' to anything. @code{SYMTAB} elements refer to all @emph{global}
+variables and arrays, but not to @emph{local} variables and arrays.
+If a function @code{A(argA, localA)} calls another function @code{B()},
+the two variables local to @code{A()} are @emph{not} accessible in
+function @code{B()} or any other function. The global/local distinction
+is also important to remember when passing arguments to a function called
+indirectly (@pxref{Indirect Calls}).
+
@node Indirect Calls
@section Indirect Function Calls
@@ -42137,6 +42199,10 @@ Panos Papadopoulos contributed the original text for
@ref{Include Files}.
@cindex Yawitz, Efraim
Efraim Yawitz contributed the original text for @ref{Debugger}.
+@item
+@cindex Naman, John
+John Naman contributed the original text for @ref{Shadowed Variables}.
+
@item
@cindex Schorr, Andrew
The development of the extension API first released with
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=066dba4456309243ff46a53627f021ef80422f1a
commit 066dba4456309243ff46a53627f021ef80422f1a
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Thu Oct 10 15:07:11 2024 +0300
Add a speedup when a regex match occurs at the end of a buffer.
diff --git a/ChangeLog b/ChangeLog
index f606530d..ee00ea3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-10-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ Check if RE match at end of strig could be an exact
+ match. This is true if the maybe_long flag is false.
+ Thanks to Ronald D. Rechenmacher <ron@fnal.gov> for
+ the idea.
+
+ * io.c (rsrescan): Add an additional check when the
+ match is exactly at the end.
+ * re.c (make_regexp): Add backslash to the list of
+ characters which sets the maybe_long field.
+
2024-09-19 Arnold D. Robbins <arnold@skeeve.com>
* array.c (do_delete): Handle case where subscript is Node_elem_new.
diff --git a/io.c b/io.c
index f0c7901c..89bdb542 100644
--- a/io.c
+++ b/io.c
@@ -3713,11 +3713,19 @@ again:
* found a simple string match at end, return REC_OK
* else
* grow buffer, add more data, try again
+ * if possibly a variable length match (in which case more
+ * match could be in next input buffer)
+ * grow buffer, add more data, try again
+ * else # simpler re
+ * return REC_OK
+ * fi
* fi
*/
if (iop->off + reend >= iop->dataend) {
if (reisstring(RS->stptr, RS->stlen, RSre, iop->off))
return REC_OK;
+ else if (! RSre->maybe_long)
+ return REC_OK;
else
return TERMATEND;
}
diff --git a/re.c b/re.c
index 1e1ab34c..bfd8d02b 100644
--- a/re.c
+++ b/re.c
@@ -333,7 +333,7 @@ make_regexp(const char *s, size_t len, bool ignorecase,
bool dfa, bool canfatal)
}
for (i = len - 1; i >= 0; i--) {
- if (strchr("*+|?{}", buf[i]) != NULL) {
+ if (strchr("\\*+|?{}", buf[i]) != NULL) {
rp->maybe_long = true;
break;
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 +
doc/ChangeLog | 9 +-
doc/gawk.info | 1330 ++++++++++++++++++++++++++++++---------------------------
doc/gawk.texi | 66 +++
io.c | 8 +
re.c | 2 +-
6 files changed, 790 insertions(+), 637 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5541-gda2e2e6f,
Arnold Robbins <=