diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-07-28 10:45:48 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-07-28 10:45:48 +0300 |
commit | a44b1722ee607f3b8bf305612ff7641b393accc3 (patch) | |
tree | e0becd21b662a81ae2b270bd37a91b726749ce10 /doc/gawktexi.in | |
parent | d4a0eadbeb6882e47fb539e6373dd227ba8274a2 (diff) | |
parent | 7bcdeaa73e2fc4f0e2272b871e958b63d428b270 (diff) | |
download | egawk-a44b1722ee607f3b8bf305612ff7641b393accc3.tar.gz egawk-a44b1722ee607f3b8bf305612ff7641b393accc3.tar.bz2 egawk-a44b1722ee607f3b8bf305612ff7641b393accc3.zip |
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r-- | doc/gawktexi.in | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in index d13ea969..f7d396bf 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -19086,17 +19086,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 |