I get the idea in snap that you want people to create blocks instead of providing them with them all. 2 blocks that i think are really needed are Infinity/-Infinity and a break block for repeat loops
You can break loops using the catch block. I think it was in Iteration, Composition
I agree with the break block (it could just be named, exit loop
, or even stop [this loop]
, although that may not work, because there are c-shapes without loops, so it could be stop [this C-Shape]
), but the infinity and -infinity? You can get those easily.
Plus, I don't think I've ever needed to use infinity before.
can you show me how
oh wow. thanks
Click the file at the top of the editor. Then click libraries from the dropdown menu. The library at the top of the list should be "Iteration, composition". Click it and then click import. You should see the catch block in this library.
how do you make a break with that
nevermind i just made a custom repeat loop and a break block
Thanks for posting this!
In case you're wondering where the run w/continuation
command has gone, we can now simply reference the continuation directly in the this
block:
Plus, I don't think I've ever needed to use infinity before.
There are many possible uses for [a very large number] which is why some programming languages have something like 'max integer' which gives you their maximum possible number. (sometimes using such things is not the best way to do something, but they have a use)
I would be surprised to see something that needs infinity instead of a number.
minimax
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.