-5

It's hard to visualize a script in visual programming language like Scratch. Here's an example of what I mean:

The correct way to make an infinite loop without the forever block is to use the repeat block, with the amount of times to repeat at something like 999999999999999999999999999. Here's an example script of what you should do:

repeat (999999999999999999999999999)
    ...

(ignore the broken formatting)

Plus, you can't do C loops like shown above.

Instead, there should be a rule so you'd have to do this:

The correct way to make an infinite loop without the forever block is to use the repeat block, with the amount of times to repeat at something like 999999999999999999999999999. Here's an example script of what you should do:

Scratch block example image

It is much more easier to read and understand that.

There is even a tool that allows you to make an image like the one in the example. You can see the tool with that example here. You can export the thing as a .PNG then upload it to Imgur.

I propose there to be a rule requiring images of the Scratch blocks, not just code, for all questions and answers.

4
  • Related: meta.stackoverflow.com/a/325611
    – Laurel
    Jun 8, 2016 at 18:27
  • 4
    Adding an image is probably a good idea. But we don't even require code for all questions, why would we require code and image for one specific language? Jun 8, 2016 at 19:28
  • How would this work for users without permissions to add images to their posts?
    – theB
    Jun 8, 2016 at 22:44
  • There could be an exemption for questions ragged with Mir-scratch on here. Jun 9, 2016 at 0:53

1 Answer 1

10

The tool you are referring to is also available as a library which can be used in a snippet:

<script src="https://github.com/scratchblocks/scratchblocks/releases/download/v3.5.2/scratchblocks-v3.5.2-min.js"></script>

<pre class="blocks">
when green flag clicked
repeat [42]
  say [This is the answer.]
end
</pre>

<script>
scratchblocks.renderMatching('pre.blocks', {style: 'scratch3'});
</script>


See this answer of mine for a more complex example.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .