[Top][All Lists]

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

Re: Make division by zero legal

From: Neil R. Ormos
Subject: Re: Make division by zero legal
Date: Mon, 2 Aug 2021 21:04:52 -0500 (CDT)

Andrew J. Schorr wrote:
> Nethox wrote:

>> [...]
>> $ gawk -M 'BEGIN { print 1/0; print "workaround" }'
>> +inf
>> workaround

> I can't speak to why gawk currently crashes on
> division by zero; it does seem odd that -M
> behaves differently.

Notwithstanding mawk and gawk -M, other awks do
treat division by zero as a fatal error and, like
gawk, have for years.

I rely on that behavior.  Perhaps others do, also.

Inasmuch as there are several trivial workarounds
available to the OP, I hope his or her proposed
change will not be incorporated into gawk as
default behavior.

reply via email to

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