aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-04-21 14:34:23 +0300
committerArnold D. Robbins <arnold@skeeve.com>2019-04-21 14:45:52 +0300
commit4c28839cbd2c40f7dacc5185fee352eb28f69ac5 (patch)
tree25758e64b53006c80774c28d62fc3f28e26eab68 /doc/gawk.texi
parent7386af3ac9510a3f06d140548e6051db322e3ec2 (diff)
downloadegawk-4c28839cbd2c40f7dacc5185fee352eb28f69ac5.tar.gz
egawk-4c28839cbd2c40f7dacc5185fee352eb28f69ac5.tar.bz2
egawk-4c28839cbd2c40f7dacc5185fee352eb28f69ac5.zip
Doc fix: POSIX language on RS.
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi14
1 files changed, 12 insertions, 2 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi
index dd7389b8..21670d57 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -8302,10 +8302,20 @@ as the result of a special feature. When @code{RS} is set to the empty
string @emph{and} @code{FS} is set to a single character,
the newline character @emph{always} acts as a field separator.
This is in addition to whatever field separations result from
-@code{FS}.@footnote{When @code{FS} is the null string (@code{""})
+@code{FS}.
+
+@quotation NOTE
+When @code{FS} is the null string (@code{""})
or a regexp, this special feature of @code{RS} does not apply.
It does apply to the default field separator of a single space:
-@samp{FS = @w{" "}}.}
+@samp{FS = @w{" "}}.
+
+Note that language in the POSIX specification implies that
+this special feature should apply when @code{FS} is a regexp.
+However, Unix @command{awk} has never behaved that way, nor has
+@command{gawk}. This is essentially a bug in POSIX.
+@c Noted as of 4/2019; working to get the standard fixed.
+@end NOTE
The original motivation for this special exception was probably to provide
useful behavior in the default case (i.e., @code{FS} is equal