bug-gawk
[Top][All Lists]
Advanced

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

Re: lint warning: unnecessary mixing of `>' and `>>'


From: arnold
Subject: Re: lint warning: unnecessary mixing of `>' and `>>'
Date: Tue, 24 Oct 2023 07:37:55 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Hi.

Manuel Collado <mcollado2011@gmail.com> wrote:

> So this --lint warning is a runtime test, right? I wrongly assumed it 
> was a parsing check.

Indeed, it's a run time check, made when the redirection first happens.
Gawk has both parse time and run time lint checks.

> PS: It is probably good style to use >> in the first file write, and > 
> in all subsequent writes.

My own feeling is that one should use the same operator for the same
file throughout the program.  This is expressed in both the manual and
in the lint check itself. :-)

Of course, as this is only a lint check, in practice one can do what
one wishes and it will work without complaint.

Arnold



reply via email to

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