bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Error messages on negative arguments for `and(a, b)/or(a,


From: Andrew J. Schorr
Subject: Re: [bug-gawk] Error messages on negative arguments for `and(a, b)/or(a, b)/xor(a, b)'
Date: Mon, 22 Jul 2019 15:46:56 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Mon, Jul 22, 2019 at 08:30:29PM +0900, Koichi Murase wrote:
> I think "argument 1" and "argument 2" appearing in the error messages
> on negative arguments for `and(a, b)', `or(a, b)' and `xor(a, b)' are
> reversed. I'm using gawk-5.0, but It is also reproduced for the latest
> commit 680bf3fd.
> 
> $ gawk-devel --version
> GNU Awk 5.0.60, API: 3.0
> Copyright (C) 1989, 1991-2019 Free Software Foundation.
> ---(snip)---
> $ LC_ALL=C gawk-devel 'BEGIN{print or(-1,1);exit}'
> gawk-devel: cmd. line:1: fatal: or: argument 2 negative value -1 is not 
> allowed
> $ LC_ALL=C gawk-devel 'BEGIN{print or(1,-1);exit}'
> gawk-devel: cmd. line:1: fatal: or: argument 1 negative value -1 is not 
> allowed

Good catch. Does the attached patch fix it?

Regards,
Andy

Attachment: argnum.patch
Description: Text document


reply via email to

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