Boolean Shortcircuiting
- From: Arnold Doray <invalid@xxxxxxxxxxx>
- Date: Wed, 9 May 2012 15:02:59 +0000 (UTC)
Dear Forthers,
Is there a way to implement boolean short-circuiting in Forth?
For example:
: bad? ( img -- f )
dup error? if true exit then
dup corrupted? if true exit then
old? if true exit then
false ;
Which seems terribly repetitious to me. But I don't want to / can't
perform CORRUPTED? if ERROR? returns true.
Is there a better way?
Thanks,
Arnold
.
- Follow-Ups:
- Re: Boolean Shortcircuiting
- From: Paul Rubin
- Re: Boolean Shortcircuiting
- From: Andrew Haley
- Re: Boolean Shortcircuiting
- Prev by Date: Re: Incremental Averaging
- Next by Date: Re: Boolean Shortcircuiting
- Previous by thread: Industrial Automation Training and Placements in Coimbatore
- Next by thread: Re: Boolean Shortcircuiting
- Index(es):