aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-06-05 21:40:17 +0300
committerArnold D. Robbins <arnold@skeeve.com>2019-06-05 21:40:17 +0300
commitc138c86811fd6dfa96e49cfca4f619294ae57f9c (patch)
tree07ef8b2ca75c289b068e319ced709934217db6cd /doc/gawk.texi
parent0d6254e250560c027116defc11ffdee410bc683f (diff)
downloadegawk-c138c86811fd6dfa96e49cfca4f619294ae57f9c.tar.gz
egawk-c138c86811fd6dfa96e49cfca4f619294ae57f9c.tar.bz2
egawk-c138c86811fd6dfa96e49cfca4f619294ae57f9c.zip
Update doc on isarray() and typeof().
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi19
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