Seeking a Do While Loop

I found an xml file for a While-Do loop.

Would someone share out code for a Do-While loop?

Also, it seems to me that these types of loops, the Dictionary data type, Case statements, and if-elif-else statements should be part of the Snap basic control structure visible to everyone except very young learners and not something for more skilled users to figure out how to implement or import from a library.

Please note the Case statement in its current implementation in the Multi-branched Conditional library doesn't look very user friendly for someone who is new to Snap.

This is one of our favorite examples! We knew we needed some kind of case command, and we thought we were going to have to invent input groups (so we could make the pair of test and action variadic as a group) and while we were trying to work out how to do that, we were surprised to get it already implemented by a 12-year-old!

The Iteration and Composition library has a repeat while block

There's always going to be a balance between what should be in core Snap! and what should be in a library

Skilled users can maintain their own default projects which already contain the blocks they deem essential to save a bit of mouse-clicking :slight_smile:

And IMO Snap! is no worse than the likes of Python in this regard :slight_smile:

Your right but it works and so has never risen to the top of the list of tasks :slight_smile:

But hopefully if/elseif/else will get to the top soon and join it's cousin :slight_smile:

Now a real else if structure would be great!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.