Discuss Scratch
- Discussion Forums
- » Suggestions
- » Elif (else-if) block
- ihavenocluewhythisis
-
500+ posts
Elif (else-if) block
what dupe? Support because this would make most codes become a large mess of orange blocks a bit less, and also because I might as well because I supported a dupe.
- Pengufenhoffer
-
100+ posts
Elif (else-if) block
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
...
its too big
What if we could make switch statements in scratch? As in java.
switch() {
case 1:
does_something;
case 2:
does_something_else;
case 3:
does_something_completely _different;
default:
does_something_significantly_less_exciting;
}
- iiucandyfloss
-
1000+ posts
Elif (else-if) block
What is the need for this?
There is already the
block, so why do we need a separate block made?
The workaround is very clear. Additionally, the name “Elif” is not very clear. Scratch is supposed to be easy for New Scratchers to understand and grasp the concept of, not an advanced coding platform.
There is already the
if <> then
else
end
block, so why do we need a separate block made?
The workaround is very clear. Additionally, the name “Elif” is not very clear. Scratch is supposed to be easy for New Scratchers to understand and grasp the concept of, not an advanced coding platform.
- starlightsparker
-
1000+ posts
Elif (else-if) block
FOR THE LAST TIME What is the need for this?
There is already theif <> then
else
end
block, so why do we need a separate block made?
The workaround is very clear. Additionally, the name “Elif” is not very clear. Scratch is supposed to be easy for New Scratchers to understand and grasp the concept of, not an advanced coding platform.
ITS MESSY
NESTING IF ELSE BLOCKS MAKES IT MESSY, THIS WOULD BE MORE ORGANIZED
This workaround has been said 1000000102083937937937292 times, it doesn’t need to be repeated so many times it’s literally just annoying at this point.
- iiucandyfloss
-
1000+ posts
Elif (else-if) block
FOR THE LAST TIME Why do we need a separate block made?
ITS MESSY
NESTING IF ELSE BLOCKS MAKES IT MESSY, THIS WOULD BE MORE ORGANIZED
This workaround has been said 1000000102083937937937292 times, it doesn’t need to be repeated so many times it’s literally just annoying at this point.
1) Please calm down. Capitalising your letters does not help your point, it actually undermines it by making you seem uncontrolled and angry. I think that is not your aim. Am I correct?
2) And? It's still an extremely suitable workaround, and is less complicated.
3) Telling me that I'm being annoying doesn't help. Also, saying so is rather rude, please calm down and stop shouting at people who are trying to discuss a topic in a civil manner.
4) Code is not supposed to be a pretty piece of art that you can stare at because of its beauty.
5) “If else”. Does that make sense? It is not very clear. What happens if the “if” is true? This workaround would solve this:
if <> then
set [ v] to [1]
end
if <<[v] = [1] >> then
end
The second piece of code serves the “Else” purpose. The first section of code adds the feature of changing a variable based on the result of the “if” block, which is what causes the second piece of code to work properly.
The first workaround is much more simple. Do you agree?
Last edited by iiucandyfloss (May 14, 2024 20:27:11)
- starlightsparker
-
1000+ posts
Elif (else-if) block
… did I not just answer you? What is the need for this?
There is already theif <> then
else
end
block, so why do we need a separate block made?
The workaround is very clear. Additionally, the name “Elif” is not very clear. Scratch is supposed to be easy for New Scratchers to understand and grasp the concept of, not an advanced coding platform.
- iiucandyfloss
-
1000+ posts
Elif (else-if) block
… did I not just answer you? What is the need for this?
There is already theif <> then
else
end
block, so why do we need a separate block made?
The workaround is very clear. Additionally, the name “Elif” is not very clear. Scratch is supposed to be easy for New Scratchers to understand and grasp the concept of, not an advanced coding platform.
Sorry, I had this on one tab because of the 60 second rule and then I accidentally posted on another tab and the action was repeated . However, i have edited the post now, you can have a look at it.
- cuddlyscout
-
21 posts
Elif (else-if) block
I was literally just going to comment on this when I saw this… What a coincidence! I 100 percent agree with this and want it added super badly. I hate having to stack if/else blocks. I think there should be a little symbol on the end of the if/else blocks to add more else blocks, and make the previous blocks if else blocks.
I Program in C# (And Various other languages as well) and most of them all contain some soft of if else statement.
This would:
Although please let's not name if “elif”. THat's confusing for beginners, and scratch is against that. Just stick with the classic JavaScript “else if {}”
If this is denied, I would request switch statements similar to JavaScript. This would also be nice.
I Program in C# (And Various other languages as well) and most of them all contain some soft of if else statement.
This would:
- Create cleaner code easier to read
- Potentially make programs faster by not having to call as many if/elses.
Although please let's not name if “elif”. THat's confusing for beginners, and scratch is against that. Just stick with the classic JavaScript “else if {}”
If this is denied, I would request switch statements similar to JavaScript. This would also be nice.
Last edited by cuddlyscout (May 14, 2024 23:08:22)
- ihavenocluewhythisis
-
500+ posts
Elif (else-if) block
#python I was literally just going to comment on this when I saw this… What a coincidence! I 100 percent agree with this and want it added super badly. I hate having to stack if/else blocks. I think there should be a little symbol on the end of the if/else blocks to add more else blocks, and make the previous blocks if else blocks.
I Program in C# (And Various other languages as well) and most of them all contain some soft of if else statement.
This would:
- Create cleaner code easier to read
In my opinion, this is a must.
- Potentially make programs faster by not having to call as many if/elses.
Although please let's not name if “elif”. THat's confusing for beginners, and scratch is against that. Just stick with the classic JavaScript “else if {}”
If this is denied, I would request switch statements similar to JavaScript. This would also be nice.
- starlightsparker
-
1000+ posts
Elif (else-if) block
We all have our breaking point, sorry I was getting Irritated by how many times this dang workaround has been said lol. If it helps I’m a kid and I don’t always think before speaking :’)FOR THE LAST TIME Why do we need a separate block made?
ITS MESSY
NESTING IF ELSE BLOCKS MAKES IT MESSY, THIS WOULD BE MORE ORGANIZED
This workaround has been said 1000000102083937937937292 times, it doesn’t need to be repeated so many times it’s literally just annoying at this point.
1) Please calm down. Capitalising your letters does not help your point, it actually undermines it by making you seem uncontrolled and angry. I think that is not your aim. Am I correct?
2) And? It's still an extremely suitable workaround, and is less complicated.
3) Telling me that I'm being annoying doesn't help. Also, saying so is rather rude, please calm down and stop shouting at people who are trying to discuss a topic in a civil manner.
4) Code is not supposed to be a pretty piece of art that you can stare at because of its beauty.
5) “If else”. Does that make sense? It is not very clear. What happens if the “if” is true? This workaround would solve this:if <> then
set [ v] to [1]
endif <<[v] = [1] >> then
end
The second piece of code serves the “Else” purpose. The first section of code adds the feature of changing a variable based on the result of the “if” block, which is what causes the second piece of code to work properly.
The first workaround is much more simple. Do you agree?
Also, while the suggestion may have flaws, the flaw that the workaround is really irritating and annoying to work with. It becomes really messy. Especially for projects that already have so many blocks.
Also it’s not if else it’s else if.
So it would detect if condition is true, if not it resorts to “else if” and if that condition isn’t met it resorts to the other else if till all of them are checked
It’s not rocket science
By the way I didn’t call you annoying I called the extensive amount of times this workaround has been said annoying.
I have somewhat anger issues and have trouble controlling them, while I do think I came off as rude, im just putting this here so you know it didn’t come from my heart. I’m sorry, though. Also, I'm probably not gonna sleep tonight knowing the thing happened where I break and shout but the other end is all mature so I'm left looking like an immature brat-
Edit:
Ohhh I just realized now you mean in this post stacking if blocks, not nesting if else blocks.
Not even sure if that works the same actually. I'll wait for someone else to respond
Last edited by starlightsparker (May 15, 2024 16:33:33)
- julmik6478
-
500+ posts
Elif (else-if) block
You can make IT like this:
if <> then
else
if <> then
end
end
- starlightsparker
-
1000+ posts
Elif (else-if) block
(I'm holding it in oh my GOD I'm gonna scream) You can make IT like this:if <> then
else
if <> then
end
end
Perhaps read other replies before posting next time just in case this workaround has posted before about 9 trillion times /hj
This isn't a good workaround because when nested it becomes messy.
- iiucandyfloss
-
1000+ posts
Elif (else-if) block
always think before speaking :’)That's quite all right. We all have our breaking point, sorry I was getting Irritated by how many times this dang workaround has been said lol. If it helps I’m a kid and I don’t
Also, while the suggestion may have flaws, the flaw that the workaround is really irritating and annoying to work with. It becomes really messy. Especially for projects that already have so many blocks.
I was a young child once too, you know! I understand.
Mess is less annoying than difficulty coding. Do you agree?
Also it’s not if else it’s else if.
Right.
So it would detect if condition is true, if not it resorts to “else if” and if that condition isn’t met it resorts to the other else if till all of them are checked
It’s not rocket science
This is much more confusing than a simple “If < > is true, then _____” “If else(not), then __________”
If you're trying to tell me, “It's not that hard to understand,” drop it.
Telling me something is easy does not make it easier.
By the way I didn’t call you annoying I called the extensive amount of times this workaround has been said annoying.
Can you give me one valid reason why the workaround is not suitable? That's not “It's messy” because that is like saying, “I won't code something I want to code because it's too long and messy even though I understand the code,” ?
The repetition of this workaround is highly relevant to the discussion.
I have somewhat anger issues and have trouble controlling them, while I do think I came off as rude, im just putting this here so you know it didn’t come from my heart. I’m sorry, though. Also, I'm probably not gonna sleep tonight knowing the thing happened where I break and shout but the other end is all mature so I'm left looking like an immature brat-
1) Okay
2) Let's get this straight. It didn't just come off as rude; it was rude.
3) That's fine
4) Are you trying to guilt trip me here, or use a sob story? If you are, drop it; I don't have time to be manipulated, I have exams to prepare for. If not, I'm not trying to insult you, this is a genuine question.
5) Don't think I don't have a sense of humour


6) And no, you're not an immature brat, only if you act like one. And those actions were immature-brat-ly but that doesn't mean you are an immature brat.
You realised your mistake and how you acted and came to your senses; that takes a strong character, not an “immature brat”.
- starlightsparker
-
1000+ posts
Elif (else-if) block
I know this is off topic but I need to respond to thisI have somewhat anger issues and have trouble controlling them, while I do think I came off as rude, im just putting this here so you know it didn’t come from my heart. I’m sorry, though. Also, I'm probably not gonna sleep tonight knowing the thing happened where I break and shout but the other end is all mature so I'm left looking like an immature brat-
1) Okay
2) Let's get this straight. It didn't just come off as rude; it was rude.
3) That's fine
4) Are you trying to guilt trip me here, or use a sob story? If you are, drop it; I don't have time to be manipulated, I have exams to prepare for. If not, I'm not trying to insult you, this is a genuine question.
5) Don't think I don't have a sense of humour![]()
6) And no, you're not an immature brat, only if you act like one. And those actions were immature-brat-ly but that doesn't mean you are an immature brat.
You realised your mistake and how you acted and came to your senses; that takes a strong character, not an “immature brat”.
1. Okay
2. I know, I probably shouldn’t have worded that like that but I did mean that it was rude, for some reason I always word it like that by habit but “was rude” is what I mean by that : p
3. ok
4. uh, no? I wanna say something else but that’d also turn into a “sob story” unintentionally even though I don’t mean to manipulate anybody so I’ll probably do so yeah I’ll just say uh, no
5. what does that mean
6. good to know
- iiucandyfloss
-
1000+ posts
Elif (else-if) block
was rude.I know this is off topic but I need to respond to this 2) Let's get this straight. It didn't just come off as rude; it
3) That's fine
4) Are you trying to guilt trip me here, or use a sob story? If you are, drop it; I don't have time to be manipulated, I have exams to prepare for. If not, I'm not trying to insult you, this is a genuine question.
5) Don't think I don't have a sense of humour![]()
6) And no, you're not an immature brat, only if you act like one. And those actions were immature-brat-ly but that doesn't mean you are an immature brat.
You realised your mistake and how you acted and came to your senses; that takes a strong character, not an “immature brat”.
1. Okay
2. I know, I probably shouldn’t have worded that like that but I did mean that it was rude, for some reason I always word it like that by habit but “was rude” is what I mean by that : p
3. ok
4. uh, no? I wanna say something else but that’d also turn into a “sob story” unintentionally even though I don’t mean to manipulate anybody so I’ll probably do so yeah I’ll just say uh, no
5. what does that mean
6. good to know
1. Does your story fit into these:
a) It's a fake story
b) It's said to make someone do something because of pity or guilt
c) It's highly overexaggerated e.g. Normal:“ I'm disappointed because I got denied into a university but at least I was accepted into another one” VS s.s.: “I'm dEvAsTaTeD because my life's opportunities are ruined, my future is destroyed, my dreams are crushed, my alternative is a really bad university (but actually it was smth like refusal to Harvard but accepted into Oxford ) and I feel like crying my eyes out”
2 . I meant, “I'm not an 8 year old, but I wasn't born in 1892 lol”
Last edited by iiucandyfloss (May 15, 2024 19:03:55)
- starlightsparker
-
1000+ posts
Elif (else-if) block
No, not really, it’s what I said on your profile page I said it a few mins after posting this.was rude.I know this is off topic but I need to respond to this 2) Let's get this straight. It didn't just come off as rude; it
3) That's fine
4) Are you trying to guilt trip me here, or use a sob story? If you are, drop it; I don't have time to be manipulated, I have exams to prepare for. If not, I'm not trying to insult you, this is a genuine question.
5) Don't think I don't have a sense of humour![]()
6) And no, you're not an immature brat, only if you act like one. And those actions were immature-brat-ly but that doesn't mean you are an immature brat.
You realised your mistake and how you acted and came to your senses; that takes a strong character, not an “immature brat”.
1. Okay
2. I know, I probably shouldn’t have worded that like that but I did mean that it was rude, for some reason I always word it like that by habit but “was rude” is what I mean by that : p
3. ok
4. uh, no? I wanna say something else but that’d also turn into a “sob story” unintentionally even though I don’t mean to manipulate anybody so I’ll probably do so yeah I’ll just say uh, no
5. what does that mean
6. good to know
1. Does your story fit into these:
a) It's a fake story
b) It's said to make someone do something because of pity or guilt
c) It's highly overexaggerated e.g. Normal:“ I'm disappointed because I got denied into a university but at least I was accepted into another one” VS
Back to topic,
Is this what you mean by your workaround?
if <> thenI’m confused
end
if <> then
end
if <> then
end
or
if <> then
else
if <> then
else
if <> then
else
end
end
end
- julmik6478
-
500+ posts
Elif (else-if) block
Possible in that ways:
if <> thenYou can make it in amount that you want.
else
if <> then
end
end
if <> then
else
if <> then
else
end
end
- iiucandyfloss
-
1000+ posts
Elif (else-if) block
You can use this:
Or you can stack if elses.
Problem solved. Messy, yes, but aesthetics are not the main focus of coding. They are not the focus of coding in any sense.
if <not <something something>> then
do something something
end
Or you can stack if elses.
Problem solved. Messy, yes, but aesthetics are not the main focus of coding. They are not the focus of coding in any sense.
- ihavenocluewhythisis
-
500+ posts
Elif (else-if) block
get ready to get yelled at or smth cuz people said the workaround like 100 times Possible in that ways:if <> thenYou can make it in amount that you want.
else
if <> then
end
end
if <> then
else
if <> then
else
end
end
- Discussion Forums
- » Suggestions
-
» Elif (else-if) block