bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] patsplit in 4.1.1 seems to invert the usage of ARRAY and SEPS


From: Peter Trenholme
Subject: [bug-gawk] patsplit in 4.1.1 seems to invert the usage of ARRAY and SEPS
Date: Thu, 26 Mar 2015 11:15:45 -0700

Attached is a sample program, data, and output illustrating (what I believe is) the problem. I think that the info gawk file states that the pieces split from the input string are returned in the first array argument  (ARRAY) and the part matched by the separation regular _expression_ are returned in the second array argument. (SEPS) Those two roles seem to be reversed in the output of the program I attached here.

This was executed on an up-to-date Fedora "Rawhide" system, running rc4 of the 4.0.0 Linux kernel,
but I just ran the same program and data on a Fedora 21 system  (3.18.9 kernel) with the same result. (I thought that the change to gcc5 in F-23 might be a problem, but apparently not.)

$ gawk --version                                                                            
GNU Awk 4.1.1, API: 1.1                                                                                 
Copyright (C) 1989, 1991-2014 Free Software Foundation.                                                

gawk was (probably) compiled using gcc 5.0.0, but I've not confirmed that. (Since the 

Peter Trenholme

Attachment: program
Description: Binary data

Attachment: test_data
Description: Binary data

Attachment: output
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]