[Top][All Lists]

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

Re: Feature request

From: Greg Wooledge
Subject: Re: Feature request
Date: Mon, 9 Nov 2020 07:52:34 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Nov 09, 2020 at 05:27:38PM +0700, Robert Elz wrote:
>   | What cannot be controlled is the exit value if the block is not executed
>   | i.e. if the initial evaluation of the condition is false.  In that case,
>   | the exit value is always zero.
> That's what the standard says it has to be.   But since "if the initial
> evaluation of the condition is false" can be tested before getting to the
> while test, it is trivial to deal with this, [...]

Not in the general case, "while somecommand".  Running "somecommand"
may have nontrivial costs and side effects that would prevent you from
wanting to run it twice.

But as Oğuz said, it's simple to control this with an additional variable.

reply via email to

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