diff options
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 123 |
1 files changed, 71 insertions, 52 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index 2a5340d1..8009f122 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -20486,6 +20486,10 @@ index and value, use the indirect function call syntax (@pxref{Indirect Calls}) on @code{process}, passing it the index and the value. +When calling @code{walk_array()}, you would pass the name of a user-defined +function that expects to receive and index and a value, and then processes +the element. + @c ENDOFRANGE libfgdata @c ENDOFRANGE flibgdata @@ -24777,7 +24781,7 @@ complete detail in @cite{GNU gettext tools}.) @end ifnotinfo As of this writing, the latest version of GNU @code{gettext} is -@uref{ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.1.tar.gz, @value{PVERSION} 0.18.1}. +@uref{ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.2.1.tar.gz, @value{PVERSION} 0.18.2.1}. If a translation of @command{gawk}'s messages exists, then @command{gawk} produces usage messages, warnings, @@ -24818,10 +24822,28 @@ of TCP/IP networking. Finally, @command{gawk} can @dfn{profile} an @command{awk} program, making it possible to tune it for performance. +A number of advanced features require separate @value{CHAPTER}s of their +own: + +@itemize @bullet +@item +@ref{Internationalization}, discusses how to internationalize +your @command{awk} programs, so that they can speak multiple +national languages. + +@item +@ref{Debugger}, describes @command{gawk}'s built-in command-line +debugger for debugging @command{awk} programs. + +@item +@ref{Arbitrary Precision Arithmetic}, describes how you can use +@command{gawk} to perform arbitrary-precision arithmetic. + +@item @ref{Dynamic Extensions}, discusses the ability to dynamically add new built-in functions to -@command{gawk}. As this feature is still immature and likely to change, -its description is relegated to an appendix. +@command{gawk}. +@end itemize @menu * Nondecimal Data:: Allowing nondecimal input data. @@ -25023,7 +25045,6 @@ BEGIN @{ @end example Here are the results when the program is run: -@page @example $ @kbd{gawk -f compdemo.awk} @@ -25872,7 +25893,7 @@ keyboard. The @code{INT} signal is generated by the @kbd{@value{CTL}-@key{C}} or @kbd{@value{CTL}-@key{BREAK}} key, while the @code{QUIT} signal is generated by the @kbd{@value{CTL}-@key{\}} key. -Finally, @command{gawk} also accepts another option @option{--pretty-print}. +Finally, @command{gawk} also accepts another option, @option{--pretty-print}. When called this way, @command{gawk} ``pretty prints'' the program into @file{awkprof.out}, without any execution counts. @c ENDOFRANGE advgaw @@ -26059,7 +26080,7 @@ $ @kbd{gawk -D -f getopt.awk -f join.awk -f uniq.awk inputfile} where both @file{getopt.awk} and @file{uniq.awk} are in @env{$AWKPATH}. (Experienced users of GDB or similar debuggers should note that this syntax is slightly different from what they are used to. -With @command{gawk} debugger, the arguments for running the program are given +With the @command{gawk} debugger, you give the arguments for running the program in the command line to the debugger rather than as part of the @code{run} command at the debugger prompt.) @@ -26925,54 +26946,52 @@ partial dump of Davide Brini's obfuscated code @smallexample gawk> @kbd{dump} -@print{} # BEGIN -@print{} -@print{} [ 2:0x89faef4] Op_rule : [in_rule = BEGIN] [source_file = brini.awk] -@print{} [ 3:0x89fa428] Op_push_i : "~" [PERM|STRING|STRCUR] -@print{} [ 3:0x89fa464] Op_push_i : "~" [PERM|STRING|STRCUR] -@print{} [ 3:0x89fa450] Op_match : -@print{} [ 3:0x89fa3ec] Op_store_var : O [do_reference = FALSE] -@print{} [ 4:0x89fa48c] Op_push_i : "==" [PERM|STRING|STRCUR] -@print{} [ 4:0x89fa4c8] Op_push_i : "==" [PERM|STRING|STRCUR] -@print{} [ 4:0x89fa4b4] Op_equal : -@print{} [ 4:0x89fa400] Op_store_var : o [do_reference = FALSE] -@print{} [ 5:0x89fa4f0] Op_push : o -@print{} [ 5:0x89fa4dc] Op_plus_i : 0 [PERM|NUMCUR|NUMBER] -@print{} [ 5:0x89fa414] Op_push_lhs : o [do_reference = TRUE] -@print{} [ 5:0x89fa4a0] Op_assign_plus : -@print{} [ :0x89fa478] Op_pop : -@print{} [ 6:0x89fa540] Op_push : O -@print{} [ 6:0x89fa554] Op_push_i : "" [PERM|STRING|STRCUR] -@print{} [ :0x89fa5a4] Op_no_op : -@print{} [ 6:0x89fa590] Op_push : O -@print{} [ :0x89fa5b8] Op_concat : [expr_count = 3] [concat_flag = 0] -@print{} [ 6:0x89fa518] Op_store_var : x [do_reference = FALSE] -@print{} [ 7:0x89fa504] Op_push_loop : [target_continue = 0x89fa568] [target_break = 0x89fa680] -@print{} [ 7:0x89fa568] Op_push_lhs : X [do_reference = TRUE] -@print{} [ 7:0x89fa52c] Op_postincrement : -@print{} [ 7:0x89fa5e0] Op_push : x -@print{} [ 7:0x89fa61c] Op_push : o -@print{} [ 7:0x89fa5f4] Op_plus : -@print{} [ 7:0x89fa644] Op_push : o -@print{} [ 7:0x89fa630] Op_plus : -@print{} [ 7:0x89fa5cc] Op_leq : -@print{} [ :0x89fa57c] Op_jmp_false : [target_jmp = 0x89fa680] -@print{} [ 7:0x89fa694] Op_push_i : "%c" [PERM|STRING|STRCUR] -@print{} [ :0x89fa6d0] Op_no_op : -@print{} [ 7:0x89fa608] Op_assign_concat : c -@print{} [ :0x89fa6a8] Op_jmp : [target_jmp = 0x89fa568] -@print{} [ :0x89fa680] Op_pop_loop : +@print{} # BEGIN @print{} -@dots{} +@print{} [ 1:0xfcd340] Op_rule : [in_rule = BEGIN] [source_file = brini.awk] +@print{} [ 1:0xfcc240] Op_push_i : "~" [MALLOC|STRING|STRCUR] +@print{} [ 1:0xfcc2a0] Op_push_i : "~" [MALLOC|STRING|STRCUR] +@print{} [ 1:0xfcc280] Op_match : +@print{} [ 1:0xfcc1e0] Op_store_var : O +@print{} [ 1:0xfcc2e0] Op_push_i : "==" [MALLOC|STRING|STRCUR] +@print{} [ 1:0xfcc340] Op_push_i : "==" [MALLOC|STRING|STRCUR] +@print{} [ 1:0xfcc320] Op_equal : +@print{} [ 1:0xfcc200] Op_store_var : o +@print{} [ 1:0xfcc380] Op_push : o +@print{} [ 1:0xfcc360] Op_plus_i : 0 [MALLOC|NUMCUR|NUMBER] +@print{} [ 1:0xfcc220] Op_push_lhs : o [do_reference = true] +@print{} [ 1:0xfcc300] Op_assign_plus : +@print{} [ :0xfcc2c0] Op_pop : +@print{} [ 1:0xfcc400] Op_push : O +@print{} [ 1:0xfcc420] Op_push_i : "" [MALLOC|STRING|STRCUR] +@print{} [ :0xfcc4a0] Op_no_op : +@print{} [ 1:0xfcc480] Op_push : O +@print{} [ :0xfcc4c0] Op_concat : [expr_count = 3] [concat_flag = 0] +@print{} [ 1:0xfcc3c0] Op_store_var : x +@print{} [ 1:0xfcc440] Op_push_lhs : X [do_reference = true] +@print{} [ 1:0xfcc3a0] Op_postincrement : +@print{} [ 1:0xfcc4e0] Op_push : x +@print{} [ 1:0xfcc540] Op_push : o +@print{} [ 1:0xfcc500] Op_plus : +@print{} [ 1:0xfcc580] Op_push : o +@print{} [ 1:0xfcc560] Op_plus : +@print{} [ 1:0xfcc460] Op_leq : +@print{} [ :0xfcc5c0] Op_jmp_false : [target_jmp = 0xfcc5e0] +@print{} [ 1:0xfcc600] Op_push_i : "%c" [MALLOC|STRING|STRCUR] +@print{} [ :0xfcc660] Op_no_op : +@print{} [ 1:0xfcc520] Op_assign_concat : c +@print{} [ :0xfcc620] Op_jmp : [target_jmp = 0xfcc440] +@print{} +@dots{} @print{} -@print{} [ 8:0x89fa658] Op_K_printf : [expr_count = 17] [redir_type = ""] -@print{} [ :0x89fa374] Op_no_op : -@print{} [ :0x89fa3d8] Op_atexit : -@print{} [ :0x89fa6bc] Op_stop : -@print{} [ :0x89fa39c] Op_no_op : -@print{} [ :0x89fa3b0] Op_after_beginfile : -@print{} [ :0x89fa388] Op_no_op : -@print{} [ :0x89fa3c4] Op_after_endfile : +@print{} [ 2:0xfcc5a0] Op_K_printf : [expr_count = 17] [redir_type = ""] +@print{} [ :0xfcc140] Op_no_op : +@print{} [ :0xfcc1c0] Op_atexit : +@print{} [ :0xfcc640] Op_stop : +@print{} [ :0xfcc180] Op_no_op : +@print{} [ :0xfcd150] Op_after_beginfile : +@print{} [ :0xfcc160] Op_no_op : +@print{} [ :0xfcc1a0] Op_after_endfile : gawk> @end smallexample |