Discuss Scratch
- Discussion Forums
- » Suggestions
- » Elif (else-if) block
- Tymewalk
-
1000+ posts
Elif (else-if) block
Support unless zebra-colouring is added.
What is “zebra-coloring”? If by that you mean everything's going to be a different color, then no, it will all be the same color.
- stickfiregames
-
1000+ posts
Elif (else-if) block
Support unless zebra-colouring is added.
What is “zebra-coloring”? If by that you mean everything's going to be a different color, then no, it will all be the same color.

This is zebra colouring - it alternates the colours of nested blocks (shown on the control and operators blocks here) to make them easier to differentiate.
- DaSpudLord
-
1000+ posts
Elif (else-if) block
No support, unless it's optional.Support unless zebra-colouring is added.
What is “zebra-coloring”? If by that you mean everything's going to be a different color, then no, it will all be the same color.
This is zebra colouring - it alternates the colours of nested blocks (shown on the control and operators blocks here) to make them easier to differentiate.
- IronBit_Studios
-
1000+ posts
Elif (else-if) block
It doesn't get messy, eh?
This is the actual code for a custom tile render I made
Definite support.
- Nether_before
-
1000+ posts
Elif (else-if) block
Support as while it may not be “messy”, it's really annoying to look at all those if else's. It just looks a bit silly.
- Vetpetmon
-
1000+ posts
Elif (else-if) block
Wish I had the gif ready… REASON: My browser / operating system: Windows 7, Firefox 38.0, Flash 17.0 (release 0) (My Mac is the main OS It doesn't get messy, eh?
This is the actual code for a custom tile render I made
Definite support.

Support.
- A-no-meep
-
100+ posts
Elif (else-if) block
The only “mess” I see is a bit of extra space taken up. Other than that, looks clean as a whistle to me.That's not very messy. It doesn't get messy, eh?
Image hidden. View it here- http://i.cubeupload.com/Iyldpr.png
This is the actual code for a custom tile render I made
Definite support.
Even though it may just be extra space taken up, getting the space back would declutter the coding area. I support this idea.
- Tymewalk
-
1000+ posts
Elif (else-if) block
No support, unless it's optional.Support unless zebra-colouring is added.
What is “zebra-coloring”? If by that you mean everything's going to be a different color, then no, it will all be the same color.
This is zebra colouring - it alternates the colours of nested blocks (shown on the control and operators blocks here) to make them easier to differentiate.
I don't see why zebra coloring would be useful here, the if/else if/else is just all one big block, and there's no nesting.
- Detriment2
-
100+ posts
Elif (else-if) block
It's not messy more like it doesn't contribute anything and is pretty much spamNo, it doesn't get very messy. No support.Other languages (other than Python, ick) don't have this feature. Using an “else if” conditional would be the same as doing else then a line break then an if. I don't think Scratch needs this, although I would like a switch structure.
I know that you could use a combination of else and if to get the same thing, but a lot of projects that use this usually use a lot - causing a bunch of nasty nested blocks that tend to get out of hand. The “else if” block would help fix this and keep it ordered.
- chuckdaboss
-
100+ posts
Elif (else-if) block
Support for either elseif, or zebra stripes.
Zebra stripes:
Zebra stripes:
if <> then
else
if <> then::variables
else
if <> then
else
if <> then::variables
else
if <> then
else
end
- Detriment2
-
100+ posts
Elif (else-if) block
I can't edit my post, I accidentally submitted it before finishing typing out what I was saying
You can use if blocks in a chain to do else ifs, even if this block would be added, you'd really only have if elseif and else, so if you needed more than 2 elseifs you'd have to nest more blocks into it, so why not just nest more ifs together instead of making a whole new block?
You can use if blocks in a chain to do else ifs, even if this block would be added, you'd really only have if elseif and else, so if you needed more than 2 elseifs you'd have to nest more blocks into it, so why not just nest more ifs together instead of making a whole new block?
- Tymewalk
-
1000+ posts
Elif (else-if) block
I can't edit my post, I accidentally submitted it before finishing typing out what I was saying
You can use if blocks in a chain to do else ifs, even if this block would be added, you'd really only have if elseif and else, so if you needed more than 2 elseifs you'd have to nest more blocks into it, so why not just nest more ifs together instead of making a whole new block?
There would be a plus sign to add more else-ifs, like this:
if <> then
example
else if <> :: celse
another example
else if <> (+) :: celse
that plus sign adds a new elseif
else
plus sign is always on the last elseif
end
and this would avoid having to nest ifs together.
- MegaApuTurkUltra
-
1000+ posts
Elif (else-if) block
This. The workaround is easy. However, a switch block would be awesome Other languages (other than Python, ick) don't have this feature. Using an “else if” conditional would be the same as doing else then a line break then an if. I don't think Scratch needs this, although I would like a switch structure.

Last edited by MegaApuTurkUltra (May 26, 2015 16:34:19)
- invisibowl
-
23 posts
Elif (else-if) block
You don't need It doesn't get messy, eh?any of those else statements there except the last one, since If blocks automatically get skipped over if they're false. You don't even have anything in the last Else, so it's literally the exact same thing as a regular If statement.
This is the actual code for a custom tile render I made
Definite support.
I sort of support this. You never ever need more than one else-if in a conditional; if you do, you also need to rework your code (this applies to any language, not just Scratch).
Last edited by invisibowl (May 30, 2015 00:17:12)
- stickfiregames
-
1000+ posts
Elif (else-if) block
It's possible for a sprite to be touching more than one colour at once, so if it was done with just ifs it might add the position to more than one list. In this particular example it is probably set up so that the sensing sprite is only touching one colour, but other projects might use a script similar to that and be touching many colours, so they would need if/elses.You don't need It doesn't get messy, eh?any of those else statements there except the last one, since If blocks automatically get skipped over if they're false. You don't even have anything in the last Else, so it's literally the exact same thing as a regular If statement.
-snip-
This is the actual code for a custom tile render I made
Definite support.
I sort of support this. You never ever need more than one else-if in a conditional; if you do, you also need to rework your code (this applies to any language, not just Scratch).
- Gaza101
-
500+ posts
Elif (else-if) block
Support. I've never understood why this wasn't added in the first place.
- spike43884
-
79 posts
Elif (else-if) block
Ehh. the ifelseifelse would get messy to.
especially with the little + and -
if <> then
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else if <> then :: celse
else
end
especially with the little + and -
Last edited by spike43884 (May 30, 2015 13:05:38)
- emeralddog
-
100+ posts
Elif (else-if) block
same with me in my forum, it is never nice to hear “No support” if I don't like a book, I don't write to the author and say “I don't like it” I keep my opinion to myself. No support means he doesn't think it's a good idea. Honestly, I don't like the system we use around here. “No support” always comes off sounding way more harsh than it should. If I don't think Scratch should have something, I simply explain why I think that. And I can see where this would be handy if you were getting really cluttered
- Birdlegs
-
1000+ posts
Elif (else-if) block
A little different, though. Here, no support is around because the nature of the forum demands it. I just think it often comes off sounding cold and meansame with me in my forum, it is never nice to hear “No support” if I don't like a book, I don't write to the author and say “I don't like it” I keep my opinion to myself. No support means he doesn't think it's a good idea. Honestly, I don't like the system we use around here. “No support” always comes off sounding way more harsh than it should. If I don't think Scratch should have something, I simply explain why I think that. And I can see where this would be handy if you were getting really cluttered
- Discussion Forums
- » Suggestions
-
» Elif (else-if) block