🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Cesar Quiroz Fri, 14 Apr 1989 17:23
GAWK--possible parser bug
#1564
Author: Cesar Quiroz
Date: Fri, 14 Apr 1989 17:23
26 lines
1314 bytes
This affects 2.10 (and also 2.02) compiled for a Sun 3 running SunOS
3.4.  Gawk was compiled by gcc 1.34.  Credit for finding this bug goes
to Ken Yap. 

    $ gawk '
    > { x = $2-1900; print x; print $2 - 1900; }
    > '
*   0 1989 0
    -1900
    89
    $ /bin/awk '
    > { x = $2-1900; print x; print $2 - 1900; }
    > '
*   0 1989 0
    89
    89

(lines with a * are input to gawk, the other two are the print outputs)

Things work if the bogus subtraction is written ($2)-1900.  All of
this evidence points to some bogus parse.
-- 
                                      Cesar Augusto Quiroz Gonzalez
                                      Department of Computer Science
                                      University of Rochester
                                      Rochester,  NY 14627
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads