NetBSD-Bugs archive

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

Re: bin/57013: data corruption in awk



The following reply was made to PR bin/57013; it has been noted by GNATS.

From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/57013: data corruption in awk
Date: Sat, 17 Sep 2022 01:04:13 +0000 (UTC)

 On Fri, 16 Sep 2022, dholland%NetBSD.org@localhost wrote:
 
 >            if (exists[x]) {}
 >
 
 I've been bitten by this more'n once: A test like that can
 _create_ an element in the array[1] (I consider it a bad awk
 misfeature). Change the existence test to:
 
 if (x in exists) {}
 
 -RVP
 
 [1]: Gawk Manual: section 8.1.2 Referring to an Array Element
 


Home | Main Index | Thread Index | Old Index