Discuss Scratch
- Discussion Forums
- » Suggestions
- » Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
- Zekrom01
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
bump
20 something years old
Probably doing college work
- IronBit_Studios
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
Possible duplicate, but support.
![](http://i.cubeupload.com/Liv7mY.png)
- gdpr533f604550b2f20900645890
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
In other programming languages, you can do this:
See how readable this code is, as opposed to this?
if (boolean1) //These if-else statements are lined up
{
}
else if (boolean2)
{
}
else if (boolean3)
{
}
if <boolean1> then //Such indentation much wowSupport.
else
if <boolean2>
else
if <boolean3>
end
end
- MrSwaggerMuffin
-
83 posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
I support this, it would certainly help.
- wizard192
-
100+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
Support, some platformers have to do that and the script gets bigger than necessary
- WooHooBoy
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
Just noting that wouldn't work because the first statement will always be evaluated. If you have > 1000 first it would activate the correct one.if <(points) > [50 ]> then
say [Woah! Good job!]
if <(points) > [100 ]> then ::celse
say [Amazing! You're getting good!]
if <(points) > [500 ]> then ::celse
say [WHAT?!?!?! YOUR A PRO!!!!!]
if <(points) > [1000 ]> then ::celse
say [OMG WHAT!!!!!!!!!!]
else ::celse
say []
end
considered harmful
- Zekrom01
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
bump
20 something years old
Probably doing college work
- Zappy1333
-
100+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
^^^ For the example you gave, it sounds as if it should be renamed toif <... :: operators> thenSupport for that.
...
else if <... :: operators> then :: control celse
...
else if <... :: operators> then :: control celse
...
else
...
end
Mario AI | Death Pong | Crash Bandicoot Turbo Dash | Flappy Bird Scratch | AI engine | Pokémon Catching Engine G1
Imagine, Program, Be awesome!
- Arthurtilly
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
Duplicate (I posted this exact idea and THAT was a duplicate) but support.
“The world is a weird place” - Sigton | “Scratch has swallowed my life” - Sigton
“I DREW I SPOODER” - ZLGames | “My current plan is to make a plan” - ZLGames
"It's hard to watch people hanging upside down from a tree. Especially when there are no trees. - NDSDNS
“That was not grammar of correctlyness” - Arthurtilly
- Zekrom01
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
(Late) Thanks, I'll fix it.Just noting that wouldn't work because the first statement will always be evaluated. If you have > 1000 first it would activate the correct one.if <(points) > [50 ]> then
say [Woah! Good job!]
if <(points) > [100 ]> then ::celse
say [Amazing! You're getting good!]
if <(points) > [500 ]> then ::celse
say [WHAT?!?!?! YOUR A PRO!!!!!]
if <(points) > [1000 ]> then ::celse
say [OMG WHAT!!!!!!!!!!]
else ::celse
say []
end
Bump
20 something years old
Probably doing college work
- DrKat123
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
Support, i'm sure this is pretty similar with the switch statement
Moving from Scratch? Don't learn C or Java, try Snap!
it haz OOP
DrKat McKatFace
First of all I'm 100% human and humans does not have a cat face
and second, the Boaty McBoatFace/Parsey McParseFace madness has just begun
λ
Sharp, my new Scratch mod
Is my post/siggy worthy for an internet?
- Gustavo6046
-
100+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
Very good. The workaround exists but is tiring. FULL SUPPORT!
I come from Programmerland, former Brazil's South, to bring the best dreams and help to everybody!
Could be doing C++, C, Python or maybe Java… but surely Scratch!!
Check out my project titled Plate 2D: The Robber Disease…
- tiger75
-
100+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
How would you do this on laptops? I use a macbook pro to Scratch, so… Maybe control click?
Two things are infinite: the universe and human stupidity. And I'm not sure about the universe. - Albert Einstein
- Zekrom01
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
sure How would you do this on laptops? I use a macbook pro to Scratch, so… Maybe control click?
20 something years old
Probably doing college work
- little_kitten
-
500+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
Support
The above post was likely clear sass. 10 outta 10.
Unless it wasn't. Which happens from time to time. Sadly.
![](http://u.cubeupload.com/little_kitten/1a5iHAVEthecar.png)
- DatOneLefty
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
support. it is like
if () { ... } if () { ... } if () { ... } if () { ... } if () { ... } if () { ... }
Scratch data available at ScratchDB (Status)
Posts: bf97b44a7fbd33db070f6ade2b7dc549 (btw i use arch)
- Alberknyis
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
I hope you're okay with adding someone to your no supporters list. In an unfinished project I had to use eight if-else blocks inside each other, and I didn't have a problem with that. I'm not saying this suggestion is confusing or anything, because it isn't. I just don't mind the way if-else blocks are right now.
stop [all v] ::stack
- pusheenkittens
-
100+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
No support because I want to be the first non-supporter Support! This saves time. Just right click and click an option, you've got a new statement. Without this, people have to pull out a completely new block. ._.
hehe
- Zekrom01
-
1000+ posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
I understand why you don't support, and I sort of don't mind how if-else blocks work. However, this suggestion will make if-else statements more readable to others, and is also in other languages kind of like this, for example, the C++ formatting: I hope you're okay with adding someone to your no supporters list. In an unfinished project I had to use eight if-else blocks inside each other, and I didn't have a problem with that. I'm not saying this suggestion is confusing or anything, because it isn't. I just don't mind the way if-else blocks are right now.
if (condition)
{
statement
}
else if (condition)
{
statement
}
else if (condition)
{
statement
}
else
{
statement
}
if <> then ::cstartIt's just more convenient and easier to read and understand the scripts.
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
...
20 something years old
Probably doing college work
- BoyKetchup
-
96 posts
Suggestion for the if <> then block (25+ support, 3 semi, 1 no)
I think this is a good idea, but you should be rendering the blocks like this:
Also, instead of a pop-up menu you could have + and - buttons to add “else” sections.
if <> thenWith “else” before every “if” after the first “if”. That's the format most other programming languages use and would help new Scratchers learn other programming languages easier.
else if <> then::celse
else if <> then::celse
else
end
Also, instead of a pop-up menu you could have + and - buttons to add “else” sections.
if <> thenExcept with they would look more like buttons, and the text in the buttons could be different.
else if <> then::celse
else (Remove "else"::control) (Add "else"::control)::celse
end
![](http://cdn.scratch.mit.edu/scratchr2/static/__2da569fe43e79c985a93bf28c8790afe__/djangobb_forum/img/smilies/big_smile.png)
- Discussion Forums
- » Suggestions
-
» Suggestion for the if <> then block (25+ support, 3 semi, 1 no)