bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] mixed LF/CRLF scripts: incorrect line numbers


From: Eli Zaretskii
Subject: Re: [bug-gawk] mixed LF/CRLF scripts: incorrect line numbers
Date: Tue, 08 May 2018 21:02:12 +0300

> From: address@hidden
> Date: Tue, 08 May 2018 09:35:25 -0600
> 
> Gawk comes from a Unix heritage where LF ends lines, and this is backed
> up by POSIX.  In order to make life easier (if not totally easy) for people
> on Windows systems, gawk simply treats CR as whitespace.  Thus, a line
> like:
> 
>       foo = bar # comment 1 ^M bar++ # comment 2
> 
> isn't two source code lines; it's only one line with an unusual whitespace
> character in the middle.

Isn't this behavior identical to that on Posix hosts?

In any case, Cygwin is a Posix environment, and the Cygwin build of
Gawk behaves like Gawk does on Unix, i.e. it doesn't try "to make life
easier for people on Windows systems", in this regard.



reply via email to

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