diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-04-21 15:04:14 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-04-21 15:04:14 +0300 |
commit | dfb4f3b18cc0490cf1db9dad021fce62a99443b5 (patch) | |
tree | 73521ae6691edc38c503a20725135a7a7ac95d93 /doc/gawktexi.in | |
parent | 3ee06fa46236117ccb00fe4e832e7a7e4694f7f8 (diff) | |
parent | 847657fa4ec580658371d6fcaea547f7769fb569 (diff) | |
download | egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.tar.gz egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.tar.bz2 egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.zip |
Merge branch 'gawk-5.0-stable'
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r-- | doc/gawktexi.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 3548720b..e986d033 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4945,6 +4945,19 @@ returns a textual version of the flags for scalar variables, and the array back-end implementation type for arrays. This interface is subject to change and may not be stable. +When not in POSIX or compatibility mode, if you set @code{LINENO} to a +numeric value using the @option{-v} option, @command{gawk} adds that value +to the real line number for use in error messages. This is intended for +use within Bash shell scripts, such that the error message will reflect +the line number in the shell script, instead of in the @command{awk} +program. To demonstrate: + +@exmaple +$ @kbd{gawk -v LINENO=10 'BEGIN @{ print("hi" @}'} +@error{} gawk: cmd. line:11: BEGIN @{ print("hi" @} +@error{} gawk: cmd. line:11: ^ syntax error +@end example + @end ignore @node Invoking Summary |