This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-11-13 23:12:58

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Include the case block for Scratch 2.0

The case block is highly needed as it will make creating multiple if else statments easier to program and follow.

Right now when you use a lot of if else statments each one indents and this gets messy and hard to follow. A case will be easier to follow, less messy as well as teaching scratchers that theirs an easier way than typing loads of ifs.

Right now it is like this.

If variable = 1
else
if variable = 2
else
if variable = 3
else
ect.

will become.

Case variable
=1
=2
=3
case not met


Vote here. http://suggest.scratch.mit.edu/forums/6 … ?ref=title


Please can someone post a mockup of the case statment.
http://img508.imageshack.us/img508/2574/ifelse.png


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#2 2010-11-18 17:56:03

axorion
Scratcher
Registered: 2010-01-05
Posts: 28

Re: Include the case block for Scratch 2.0

[blocks]<broadcast[ <{ variable }> ]and wait c>
<when I receive[ 1
<when I receive[ 2
<when I receive[ 3
<when I receive[ 4
<when I receive[ 5
[/blocks]

Offline

 

Board footer