From 1bf8cb336c599fdd14a2c37d719f7c8879dd830a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 12 Jul 2016 05:46:28 +0300 Subject: Improve doc on use of SYMTAB. --- doc/gawk.texi | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'doc/gawk.texi') diff --git a/doc/gawk.texi b/doc/gawk.texi index 92cb57dc..6b2cf3cf 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -15119,9 +15119,28 @@ function multiply(variable, amount) @} @end example +@noindent +You would use it like this: + +@example +BEGIN @{ + answer = 10.5 + multiply("answer", 4) + print "The answer is", answer +@} +@end example + +@noindent +When run, this produces: + +@example +$ @kbd{gawk -f answer.awk} +@print{} The answer is 42 +@end example + @quotation NOTE -In order to avoid severe time-travel paradoxes,@footnote{Not to mention difficult -implementation issues.} neither @code{FUNCTAB} nor @code{SYMTAB} +In order to avoid severe time-travel paradoxes,@footnote{Not to mention +difficult implementation issues.} neither @code{FUNCTAB} nor @code{SYMTAB} is available as an element within the @code{SYMTAB} array. @end quotation @end table -- cgit v1.2.3