bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] abort keyword


From: arnold
Subject: [bug-gawk] abort keyword
Date: Mon, 08 Jan 2018 09:11:02 -0700
User-agent: Heirloom mailx 12.4 7/29/08

Changed the subject line.

"Neil R. Ormos" <address@hidden> wrote:

> But for shorter programs written for an ephemeral
> need, an abort statement that does not require the
> inclusion of library functions or additional -f
> arguments, and a specific test in the END rule,
> would save a lot of extra typing and design
> attention.  I write a lot of such one-off
> programs, often on the command-line.

I think a workable solution is a shell script that invokes gawk with
the options and arguments previded, but that preloads useful things like
abort, assert, etc.

> I'm intrigued by references in the Changelog to an abort keyword that
> was "nuked" in 2000 "after consultation with Brian Kernighan and Michael
> Brennan".

It's exactly what it looks like. I had started to implement and document
"abort" that was like exit, but that didn't run the END rule(s).
But neither Brian nor Mike were interested in adding this to their awks,
and since it can be done with other facilities, I decided to remove it.

Andy, maybe I'll do an abort extension for awkextlib.  It's
really pretty trivial to do... Feel free to beat me to it. :-)

Thanks,

Arnold



reply via email to

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