aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawktexi.in
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-07-28 10:45:26 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-07-28 10:45:26 +0300
commit89bd11ae02f14b1e24a8e8d61f207fe6d5a9db0d (patch)
tree607e2c76e691cea47a75815a7dc584426ced1d19 /doc/gawktexi.in
parent1ec92fce7023c4f10e50149b776a7bb9a538ebe9 (diff)
parent7bcdeaa73e2fc4f0e2272b871e958b63d428b270 (diff)
downloadegawk-89bd11ae02f14b1e24a8e8d61f207fe6d5a9db0d.tar.gz
egawk-89bd11ae02f14b1e24a8e8d61f207fe6d5a9db0d.tar.bz2
egawk-89bd11ae02f14b1e24a8e8d61f207fe6d5a9db0d.zip
Merge branch 'master' into feature/api-mpfr
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r--doc/gawktexi.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index f212abe6..76e91b31 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -19088,17 +19088,24 @@ BEGIN @{
@item "untyped"
@var{x} has not yet been used yet at all; it can become a scalar or an
-array.
-For example:
+array. The typing could even conceivably differ from run to run of
+the same program! For example:
@example
BEGIN @{
- print typeof(x) # x never used --> untyped
- mk_arr(x)
- print typeof(x) # x now an array --> array
+ print "initially, typeof(v) = ", typeof(v)
+
+ if ("FOO" in ENVIRON)
+ make_scalar(v)
+ else
+ make_array(v)
+
+ print "typeof(v) =", typeof(v)
@}
-function mk_arr(a) @{ a[1] = 1 @}
+function make_scalar(p, l) @{ l = p @}
+
+function make_array(p) @{ p[1] = 1 @}
@end example
@end table