Discuss Scratch

BSH1
Scratcher
100+ posts

Improved If's

I think that if's can be improved
if <> then

else
if <> then
else
if <> then
else
end

end

end

So that you can add elseif's and even multiple elseif's in one block!

The Mit Appinventor allows you to do this by opening a popup allowing you to add elseif's and an else to an if block.

I made a project with screenshots of it Here and one of how it could work on scratch.

Sonickyle
Scratcher
1000+ posts

Improved If's

It's fine asis.
No support.
TheHockeyist
Scratcher
1000+ posts

Improved If's

No support.
if <> then

else
end
is fine as is. Altering it would probably wreck the programming language.

Last edited by TheHockeyist (Aug. 6, 2014 17:18:23)

TimothyLawyer
Scratcher
1000+ posts

Improved If's

No support. The current way provides a good visual cue to beginner programmers of the logical flow of the program.
AonymousGuy
Scratcher
1000+ posts

Improved If's

This is a duplicate…

But support. If you're suggesting something like this:
if <> then
elseif <> then ▲ ▼ :: control celse
elseif <> then ▲ ▼ :: control celse
else
end
The arrows allow you to expand / delete elseifs.

Powered by DjangoBB