Discuss Scratch
- Discussion Forums
- » Suggestions
- » Elif (else-if) block
- medians
-
1000+ posts
Elif (else-if) block
if<>then{there should be this plus sign at the bottom
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}+::control
if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}@delInput @addInput::control
if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}@delInput @addInput else {
} ::control
@delInput
@addInput
Last edited by medians (Dec. 22, 2022 00:47:51)
- kingcapybaradev
-
9 posts
Elif (else-if) block
bruh they can say elif chill (sorry for abrupt edit but my opinions have changed and because i am one of the first few posters i need to look good)
Don't call it “elif”, just because it's used in Python doesn't mean the name won't be confusing.
The block (renamed) may just work but maybe it will be too cluttering with the “+”s? It's useful but will require reorganization…
- Knightbot63
-
1000+ posts
Elif (else-if) block
Sooo
Like python with elif's?
Well, I do like it but the workaround tho
So support for the reasons I stated above.
Like python with elif's?
Well, I do like it but the workaround tho
if <> thenThough I'm not copying and pasting tons of if thens and I think this can be useful for better organizations.
else
if <> then
end
end
So support for the reasons I stated above.
- hill_walker123
-
100+ posts
Elif (else-if) block
if<>then{there should be this plus sign at the bottom
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}+::controlif<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}@delInput @addInput::control
if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}@delInput @addInput else {
} ::control@delInput
@addInput
if <> then
else
if <> then
else
if <> then
else
end
end
end
- PkmnQ
-
1000+ posts
Elif (else-if) block
99 levels of nesting vs long blockif <> then
else
if <> then
else
if <> then
else
end
end
end
- NeonG4
-
1000+ posts
Elif (else-if) block
I don't get why you would want an elif. Just do a if, else if.
- An0therRand0mC0der
-
1000+ posts
Elif (else-if) block
(#267)
I don't get why you would want an elif. Just do a if, else if.
so you don't have to have numerous else and if blocks.
- medians
-
1000+ posts
Elif (else-if) block
Because you have to drag out thousands of if else if blocks or keep duplicating them instead of just clicking a button that adds it faster. Also a lot of programming languages have else if statements. I don't get why you would want an elif. Just do a if, else if.
- GoodGoldlyJesus
-
56 posts
Elif (else-if) block
if<>then{there should be this plus sign at the bottom
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}+::controlif<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}@delInput @addInput::control
if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}else if<>then{
}@delInput @addInput else {
} ::control@delInput
@addInput
that's basically
if <> then
else
if <> then
else
if <> then
else
if <> then
else
end
end
end
end
run ({
say [Hello]
wait (1) secs
say [World!]
} @addInput :: grey ring) @addInput :: control
when :: control hat
run all at once when <button (@greenFlag ::#2aa1c9) hold for (3) seconds ::#2aa1c9> {
drink monster energy drink ::#c99c2a
}
Last edited by GoodGoldlyJesus (Feb. 16, 2023 13:49:24)
- NeonG4
-
1000+ posts
Elif (else-if) block
But you really shouldn't have “thousands of elif” statements. Sure, its laggy. But so is 1 block. I'm voting against this because you really don't need it.Because you have to drag out thousands of if else if blocks or keep duplicating them instead of just clicking a button that adds it faster. Also a lot of programming languages have else if statements. I don't get why you would want an elif. Just do a if, else if.
- scratchyGabby6
-
100+ posts
Elif (else-if) block
(#8)this is simpler and less ‘big’Python users do, as that's the name of the Python keyword. First of all, nobody calls it Elif. It's “elseif” or “else if”.
What's wrong with simply stacking if/elses?if <...> then
...
else
if <...> then
...
else
if <...> then
...
else
if <...> then
...
else
...
if <> then {
} else if <> then @delInput{
} else @delInput{
}@addInput:: control
Last edited by scratchyGabby6 (March 4, 2023 02:35:12)
- gdfsgdfsgdfg
-
1000+ posts
Elif (else-if) block
Thats a pain in the butt
what happens if you have 100 else if statements
what happens if you have 100 else if statements
- medians
-
1000+ posts
Elif (else-if) block
And what if you have 100 nested ifs (like you have to do now)? Thats a pain in the butt
what happens if you have 100 else if statements
- fvewg
-
44 posts
Elif (else-if) block
The workaround can be easily done in a seconds, it won't bother anyone if you stack 100 block up each others, that's literally what Scratch is. This couldn't really do anything rather than closing the door for the more worthy blocks to be added, and it literally have the same case as the rejected forever if block.
- scratchyGabby6
-
100+ posts
Elif (else-if) block
Replace the if else block with this one The workaround can be easily done in a seconds, it won't bother anyone if you stack 100 block up each others, that's literally what Scratch is. This couldn't really do anything rather than closing the door for the more worthy blocks to be added, and it literally have the same case as the rejected forever if block.
- guifernandes
-
49 posts
Elif (else-if) block
edit: nvm im stupid
Last edited by guifernandes (March 23, 2023 00:44:00)
- Elijah999999
-
1000+ posts
Elif (else-if) block
As in:
if <> then?
else
if <> then
else
if <> then
else
if <> then
else
end
end
end
end
Last edited by Elijah999999 (March 23, 2023 00:51:56)
- medians
-
1000+ posts
Elif (else-if) block
Yes, except it would look like this: As in:long chain ::grey?
if <> then {
} else if <> then {
} else if <> then {
} else if <> then {
} else @delInput @addInput {
}::control