[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] Win32 Gawk 4.0.0 bugs
From: |
Giorgio Palandri |
Subject: |
[bug-gawk] Win32 Gawk 4.0.0 bugs |
Date: |
Mon, 7 Nov 2011 21:48:43 +0100 |
Hi; maybe I've found two bugs in gawk 4.0.0 for Windows. The first one
is in sprintf function (see following text):
THE SOURCE PROGRAM
------------------------------------------------------
C:\tmp>type test.awk
BEGIN {
c = 100
z = sprintf("%05s", c)
print z
}
GENERIC AWK INTERPRETER (maybe MAWK, I'n unsure)
------------------------------------------------------
C:\tmp>awk -f test.awk
00100
OK!
GAWK 3.1.6
------------------------------------------------------
D:\gawk-3.1.6-1-bin\bin>gawk --version
GNU Awk 3.1.6
Copyright (C) 1989, 1991-2007 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
D:\gawk-3.1.6-1-bin\bin>gawk -f test.awk
00100
OK!
GAWK 4.0.0 (same problem in dgawk)
------------------------------------------------------
C:\tmp>gawk -V
GNU Awk 4.0.0
Copyright (C) 1989, 1991-2011 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
C:\tmp>gawk -f test.awk
100
As you can see, no padding with zeroes.
The second bug is in DGAWK: if I set a breakpoint OUTSIDE of a switch
statement, all works fine.
If I set a breakpoint INSIDE a switch statement the breakpoint is set
on a following line (the increment seems arbitrary).
Bye,
--
Giorgio Palandri
(Italy)
- [bug-gawk] Win32 Gawk 4.0.0 bugs,
Giorgio Palandri <=