diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-31 22:32:44 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-31 22:32:44 +0300 |
commit | 902b25a40d5cc612dd7a0becb27a5a48afa49716 (patch) | |
tree | b4baae3a4d846d0bd60251c28ebf77dde2189573 /doc/gawk.texi | |
parent | 2bdaa6b89e00984d79305ba1066cf98c5674b556 (diff) | |
parent | 9730efeabb2116fdf7e93b4553825ba147f5f523 (diff) | |
download | egawk-902b25a40d5cc612dd7a0becb27a5a48afa49716.tar.gz egawk-902b25a40d5cc612dd7a0becb27a5a48afa49716.tar.bz2 egawk-902b25a40d5cc612dd7a0becb27a5a48afa49716.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index e0b44fa1..f710d725 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -17153,8 +17153,8 @@ function randint(n) @end example @noindent -The multiplication produces a random number greater than zero and less -than @code{n}. Using @code{int()}, this result is made into +The multiplication produces a random number greater than or equal to +zero and less than @code{n}. Using @code{int()}, this result is made into an integer between zero and @code{n} @minus{} 1, inclusive. The following example uses a similar function to produce random integers @@ -20506,10 +20506,23 @@ Remember that you must supply a leading @samp{@@} in front of an indirect functi Starting with @value{PVERSION} 4.1.2 of @command{gawk}, indirect function calls may also be used with built-in functions and with extension functions -(@pxref{Dynamic Extensions}). The only thing you cannot do is pass a regular -expression constant to a built-in function through an indirect function -call.@footnote{This may change in a future version; recheck the documentation that -comes with your version of @command{gawk} to see if it has.} +(@pxref{Dynamic Extensions}). There are some limitations when calling +built-in functions indirectly, as follows. + +@itemize @value{BULLET} +@item +You cannot pass a regular expression constant to a built-in function +through an indirect function call.@footnote{This may change in a future +version; recheck the documentation that comes with your version of +@command{gawk} to see if it has.} This applies to the @code{sub()}, +@code{gsub()}, @code{gensub()}, @code{match()}, @code{split()} and +@code{patsplit()} functions. + +@item +If calling @code{sub()} or @code{gsub()}, you may only pass two arguments, +since those functions are unusual in that they update their third argument. +This means that @code{$0} will be updated. +@end itemize @command{gawk} does its best to make indirect function calls efficient. For example, in the following case: |