Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zmathfunc: min, max, sum throw error if result equals 0
- X-seq: zsh-workers 48608
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zmathfunc: min, max, sum throw error if result equals 0
- Date: Fri, 16 Apr 2021 20:08:32 +0000
- Archived-at: <https://zsh.org/workers/48608>
- In-reply-to: <CAH+w=7aBmf8eW8kAkKjBip70rcdCor3f-bwf1ZMeTUziw4ZJAQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <m2pn0aj4y2.fsf@zaclys.net> <20210307171712.GA9936@tarpaulin.shahaf.local2> <CAH+w=7bPz5u9-mQPbmPmbo=8Cz8em7JmbSn-sp8eZzuvFW3mnQ@mail.gmail.com> <ee7c107d-8bfb-4063-85e8-a7638ae0f951@www.fastmail.com> <CAH+w=7ZFbOJc16r6JX4Lr6uPdVRji_=RmY3WZVBK9GtXzxjPmA@mail.gmail.com> <20210416195028.GE15670@tarpaulin.shahaf.local2> <CAH+w=7aBmf8eW8kAkKjBip70rcdCor3f-bwf1ZMeTUziw4ZJAQ@mail.gmail.com>
Bart Schaefer wrote on Fri, 16 Apr 2021 20:05 +00:00:
> and why not
>
> (( arg < result ))
> case $? in
> (0) (( result = arg ));;
> (1) ;;
> (*) return $?;;
> esac
> done
> (( result ))
>
> ??
I simply missed that in the pre-posting review. I'll change it before committing.
Thanks for the review, Bart.
Daniel
- References:
- zmathfunc: min, max, sum throw error if result equals 0
- Re: zmathfunc: min, max, sum throw error if result equals 0
- Re: zmathfunc: min, max, sum throw error if result equals 0
- Re: zmathfunc: min, max, sum throw error if result equals 0
- Re: zmathfunc: min, max, sum throw error if result equals 0
- Re: zmathfunc: min, max, sum throw error if result equals 0
- Re: zmathfunc: min, max, sum throw error if result equals 0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author