diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-31 22:25:01 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-31 22:25:01 +0300 |
commit | c3d61778cf747143535320affee0612c4c6d4eb8 (patch) | |
tree | a0ee2a42b2e474da693e02a4d739cd1da62ced00 /doc/gawk.texi | |
parent | 90e1d42a99178608ec22216f7f35dadcad5a8b3a (diff) | |
parent | 0ed7e09458bdb6185586a8a0bec747b2f800ca16 (diff) | |
download | egawk-c3d61778cf747143535320affee0612c4c6d4eb8.tar.gz egawk-c3d61778cf747143535320affee0612c4c6d4eb8.tar.bz2 egawk-c3d61778cf747143535320affee0612c4c6d4eb8.zip |
Merge branch 'feature/fix-indirect-call' into gawk-4.1-stable
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index 80f8528d..d23b2128 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -20344,10 +20344,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: |