[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Noob question -- On error, exit function and terminate script
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 25 Jun 2011 18:41:02 +0200
On Sat, Jun 25, 2011 at 6:18 PM, Xavier Wang <weasley.wx@gmail.com> wrote:
> Sorry, but I mean, a new version of assert against the baselib one that
> _don't_ evaluate the second expression if the first expression is true.
That is difficult because assert() is a function, not a macro like in C.
It's a pity that expressions cannot be statements, e.g. the expression
1 == 0 or error_fn()
works as we want: error_fn() is only called if the first condition fails.
steve d.
- References:
- Noob question -- On error, exit function and terminate script, marbux
- Re: Noob question -- On error, exit function and terminate script, Rebel Neurofog
- Re: Noob question -- On error, exit function and terminate script, Xavier Wang
- Re: Noob question -- On error, exit function and terminate script, Timothy Hunter
- Re: Noob question -- On error, exit function and terminate script, Xavier Wang