aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawktexi.in
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-31 22:32:44 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-03-31 22:32:44 +0300
commit902b25a40d5cc612dd7a0becb27a5a48afa49716 (patch)
treeb4baae3a4d846d0bd60251c28ebf77dde2189573 /doc/gawktexi.in
parent2bdaa6b89e00984d79305ba1066cf98c5674b556 (diff)
parent9730efeabb2116fdf7e93b4553825ba147f5f523 (diff)
downloadegawk-902b25a40d5cc612dd7a0becb27a5a48afa49716.tar.gz
egawk-902b25a40d5cc612dd7a0becb27a5a48afa49716.tar.bz2
egawk-902b25a40d5cc612dd7a0becb27a5a48afa49716.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r--doc/gawktexi.in25
1 files changed, 19 insertions, 6 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index f8642fca..4e2b67d7 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -16435,8 +16435,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
@@ -19627,10 +19627,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: