- [OT] An if any and if all blocks - 5 Updates
rick.c.hodgin@gmail.com: Aug 06 06:50PM -0700 CAlive will introduce the [if any] and [if all] blocks. The [if any] block allows a group of tests to be conducted, and if any of them pass it will enter the block, and if all fail it will fall through to the else. The if all block allows a group of tests to be conducted, and if all of them pass it will enter the block, and if any of them fail it will fall through to the else. The succeed and fail portions are optional. Each (expression) can be written as any valid, boolean expression. They do not require parentheses. https://groups.google.com/d/msg/caliveprogramminglanguage/IEb6wVv9cW0/XTBcF7CqAgAJ if any | (expression1) succeed name1s fail name1f | (expression2) succeed expression2 fail expression2 | (expression3) succeed expression3 fail expression3 | (expression4) succeed expression4 fail expression4 { // Code here if all of them pass } else { // Code here if it fails } flow name1s { // Code here for the expression1 success } flow name1f { // Code here for the expression1 fail } Note: The if all block is identical, except it uses the "if all" header. I mention it here because such a feature could be added to C/C++. -- Rick C. Hodgin |
woodbrian77@gmail.com: Aug 06 07:53PM -0700 > I mention it here because such a feature could be added to C/C++. > -- > Rick C. Hodgin This looks like some syntax sugar -- slightly useful, imo. Brian Ebenezer Enterprises - Enjoying programming again. https://github.com/Ebenezer-group/onwards |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 07 03:04PM +0100 > } > Note: The if all block is identical, except it uses the "if all" header. > I mention it here because such a feature could be added to C/C++. You are off your meds again, spammer. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
rick.c.hodgin@gmail.com: Aug 07 07:43AM -0700 On Friday, August 7, 2020 at 10:04:51 AM UTC-4, Mr Flibble wrote: > [snip] Another way to be is to be helpful, loving, compassionate, not biting and hateful, mean and a jerk. I've met a few people like you in my life. I don't see how people can live like that. It's an existence with so much pain, so much anger, so much hurt. It doesn't have to be that way. -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 07 07:25PM +0100 > live like that. It's an existence with so much pain, so much anger, so > much hurt. > It doesn't have to be that way. Fuck off, spammer. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment