aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi26
1 files changed, 16 insertions, 10 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 6f5f4f81..d9f6bc9c 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -8105,7 +8105,6 @@ FPAT = "([^,]*)|(\"[^\"]+\")"
Finally, the @code{patsplit()} function makes the same functionality
available for splitting regular strings (@pxref{String Functions}).
-
@node Testing field creation
@section Checking How @command{gawk} Is Splitting Records
@@ -15762,19 +15761,18 @@ This element gives a string indicating the platform for which
@item "vms"
OpenVMS or Vax/VMS.
-@item "macosx"
-Mac OS X.
-
-@item "cygwin"
-@itemx "djgpp"
+@item "djgpp"
@itemx "mingw"
-Microsoft Windows, using either Cygwin, DJGPP, or MinGW, respectively.
+Microsoft Windows, using either DJGPP or MinGW, respectively.
@item "os2"
OS/2.
+@item "os390"
+OS/390.
+
@item "posix"
-GNU/Linux and legacy Unix systems.
+GNU/Linux, Cygwin, Mac OS X, and legacy Unix systems.
@end table
@item PROCINFO["pgrpid"]
@@ -18431,8 +18429,8 @@ whitespace goes into @code{@var{seps}[@var{n}]}, where @var{n} is the
return value of
@code{split()} (i.e., the number of elements in @var{array}).
-The @code{split()} function splits strings into pieces in a
-manner similar to the way input lines are split into fields. For example:
+The @code{split()} function splits strings into pieces in the same way
+that input lines are split into fields. For example:
@example
split("cul-de-sac", a, "-", seps)
@@ -18468,6 +18466,8 @@ are separated by runs of whitespace.
Also, as with input field splitting, if @var{fieldsep} is the null string, each
individual character in the string is split into its own array element.
@value{COMMONEXT}
+Additionally, if @var{fieldsep} is a single-character string, that string acts
+as the separator, even if its value is a regular expression metacharacter.
Note, however, that @code{RS} has no effect on the way @code{split()}
works. Even though @samp{RS = ""} causes the newline character to also be an input
@@ -40049,6 +40049,12 @@ appropriate @samp{-v BINMODE=@var{N}} option on the command line.
@code{BINMODE} is set at the time a file or pipe is opened and cannot be
changed midstream.
+On POSIX-compatible systems, this variable's value has no effect.
+Thus, if you think your program will run on multiple different systems
+and that you may need to use @code{BINMODE}, you should simply set it
+(in the program or on the command line) unconditionally, and not worry
+about the operating system on which your program is running.
+
The name @code{BINMODE} was chosen to match @command{mawk}
(@pxref{Other Versions}).
@command{mawk} and @command{gawk} handle @code{BINMODE} similarly; however,