bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] exit in BEGIN without trigger END


From: Nelson H. F. Beebe
Subject: Re: [bug-gawk] exit in BEGIN without trigger END
Date: Wed, 28 Nov 2018 10:17:34 -0700

Peng Yu <address@hidden> asks on  Wed, 28 Nov 2018 10:45:44 -0600
about avoiding the END action if the BEGIN action issues an exit() call.

This should be easy to do without changing awk implementations:

BEGIN { ... ; disable_end = 1 ; exit(0) }

END   { if (!disable_end) { ... } }

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



reply via email to

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