diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-06-05 21:40:51 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-06-05 21:40:51 +0300 |
commit | 18e5593d01c9a69f48d9fc78424c025f81cbe6a8 (patch) | |
tree | 07ef8b2ca75c289b068e319ced709934217db6cd /doc/gawk.texi | |
parent | 4b31ecec7846e64148ce5868152232d5ba59aa25 (diff) | |
parent | c138c86811fd6dfa96e49cfca4f619294ae57f9c (diff) | |
download | egawk-18e5593d01c9a69f48d9fc78424c025f81cbe6a8.tar.gz egawk-18e5593d01c9a69f48d9fc78424c025f81cbe6a8.tar.bz2 egawk-18e5593d01c9a69f48d9fc78424c025f81cbe6a8.zip |
Merge branch 'gawk-5.0-stable'
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index 449fac49..1b248fc6 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -20488,17 +20488,20 @@ an array or not. The second is inside the body of a user-defined function array or not. @quotation NOTE -Using @code{isarray()} at the global level to test -variables makes no sense. Because you are the one writing the program, you -are supposed to know if your variables are arrays or not. And in fact, -due to the way @command{gawk} works, if you pass the name of a variable -that has not been previously used to @code{isarray()}, @command{gawk} -ends up turning it into a scalar. +While you can use @code{isarray()} at the global level to test variables, +doing so makes no sense. Because @emph{you} are the one writing the +program, @emph{you} are supposed to know if your variables are arrays +or not. @end quotation The @code{typeof()} function is general; it allows you to determine -if a variable or function parameter is a scalar, an array, or a strongly -typed regexp. +if a variable or function parameter is a scalar (number, string, +or strongly typed regexp) or an array. + +Normally, passing a variable that has never been used to a built-in +function causes it to become a scalar variable (unassigned). +However, @code{isarray()} and @code{typeof()} are different; they do +not change their arguments from untyped to unassigned. @node I18N Functions @subsection String-Translation Functions |