Discuss Scratch
- Discussion Forums
- » Suggestions
- » Elif (else-if) block
- banana439monkey
- Scratcher
1000+ posts
Elif (else-if) block
Scalability, my friend. that's why elif existsif <> then{
}else if <> {
} else {
} end @delInput @addInput::control
Banana
Banana
——————————————————————————–
Very inactive user who has now become a maker.
If you reply to this post it would be greatly appreciated if you could comment the link to your post on my profile!!!
- 6d66yh
- Scratcher
100+ posts
Elif (else-if) block
Are you sure? The C preprocessor statement #elif is not called ‘#else if’.Actually, C calls it else if, which makes a LOT more sense.Python, C? First of all, nobody calls it Elif
Integer arithmetic suggestion: https://scratch.mit.edu/discuss/post/5163608/
- banana439monkey
- Scratcher
1000+ posts
Elif (else-if) block
i thought they meant c-style languages like jsAre you sure? The C preprocessor statement #elif is not called ‘#else if’.Actually, C calls it else if, which makes a LOT more sense.Python, C? First of all, nobody calls it Elif
Banana
Banana
——————————————————————————–
Very inactive user who has now become a maker.
If you reply to this post it would be greatly appreciated if you could comment the link to your post on my profile!!!
- superbuddy2
- Scratcher
100+ posts
Elif (else-if) block
if <>
else
end
if <>
else if <>
else
end
Hi! This is my signature - @superbuddy2 - and I am taking applications for my Scratch Operating System, where I plan to make a full-on third-party app store. Go here to submit your application. Also there is a basic trailer here. I will also be publishing updates here.
Some tutorials and scripts.
Share your favourite projects or creators here, for the new Scratch Rewind series.
- SomeoneOnThelnternet
- Scratcher
1000+ posts
Elif (else-if) block
No support, there's an incredibly easy workaround.
if <> then
else
if <> then
end
end
male | he/him | forumer | PST | 2000+ posts |
LINKS:
profile | 2000th post | scratching the surface six | more coming soon…
comment “bongis” on skadoodly's profile please
- -EmeraldThunder-
- Scratcher
1000+ posts
Elif (else-if) block
It's still not very clean Most programming languages have this feature, it would be useful to teach childeren the style of proper proramming languages. No support, there's an incredibly easy workaround.if <> then
else
if <> then
end
end
Nothing here.
- medians
- Scratcher
1000+ posts
Elif (else-if) block
when green flag clicked
set [page v] to [front]
Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that
Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.
Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL
if you see this
{what method did you use::control hat;
answer on profile ::motion
} ::operators
- Stag_
- Scratcher
100+ posts
Elif (else-if) block
Bumping?when green flag clicked
set [page v] to [front]
Support, love this idea! Would be super helpful instead of nesting if else and if loops.
- medians
- Scratcher
1000+ posts
Elif (else-if) block
YeahBumping?when green flag clicked
set [page v] to [front]
Support, love this idea! Would be super helpful instead of nesting if else and if loops.
Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that
Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.
Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL
if you see this
{what method did you use::control hat;
answer on profile ::motion
} ::operators
- 7salad3salad
- Scratcher
1000+ posts
Elif (else-if) block
Although this does look better than stacking a bunch of if else blocks, i think probably 90% of the time you wouldnt need so many of them so that it gets too cluttered.
Forumer Post Count Bar Graph! (inspired by AIGamesDeveloper)
Project: Forummon by randomguy3513
hi, contrast
JUST BECAUSE THERES A WORKAROUND ISNT A GOOD REASON TO NOT SUPPORT!!!
dont call me 7salad
dont call me 7salsa lol
just simply “Salad” will do.
:]::#00289A// This is my pet Noobles! He protects my signature from [i]unwanted guests[/i]
B){
}::#800080//This is Noobles' big brother, Probles. He has returned and Noobles is happy to see him!
//oh, yeah, he is also cool so he wears sunglasses.
:P::cap sensing//This is their little brother, Doobles
old banner thnng
- BlueBalloon11
- Scratcher
4 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
...
THANKS, really helped me
- The-Molten-Freddy
- Scratcher
500+ posts
Elif (else-if) block
An “elif” block is basically a “If then else” block with another “if then” loop in it, but with less steps.They're both equally good, so I can't say “support” but I can't say “no support”. I suggest adding an Elif (else-if) Block so you don't have to have numerous else and if blocks. I also suggest, with this, that you can change the elif amount ( making it changeable by length through numbers as part of the elif block.).
I hope you take this into account, as I would find it very useful.
(Feels like a speech! XD)
Hello! I am Molten Freddy, and this is my signature!
Ctrl+Shift+Down to see all
While you're at it, check this out
Aw yeah! Now for a meme!
˙̶̺̜̿̀̓͛͊̈́̿̃̃̓̀̓̂̚͝˙̸̡̡̛̰̖̥̖̱͈̯͔̅͛͐̑̎́͂̔̃͠˙̷̛͎͔̹̟̝͓͖̬̯̇͊̓͗̋̈́͘ǝ̶̬̰̲̏̚͝p̸̅͜ı̷͖̲̫͖͕͖͎̀̈́̿̉̒̽̈́̈̇͊͌̕͝ͅs̷̛̳͍̍͌̃̌̐́̀̅͗̋̚͘ứ̶̙͓͍̪̫͍͎͍̗͕̙̪͎͈̀̊̎̔͝ı̵̱̤̒̀ ̷͈̾̈́͊̌̐̐͛͌̀̇p̴̡̛͕͕̞͎̫̖͚̳̫̲̺̙̥̀̓̆̓̏͋ɐ̸͍͇͖̬̱̯͒͊ǝ̸̢̰̼̝͓͕̝͚͕͛͛͊͜ṕ̸̝̲̚ͅ ̵̝͗͛̒̎̀̑͂̋ɯ̶̢̧̦̜͙̲͓̀,̵̦̫̪͐͜Ì̸̛̮̦͓̟̲̬̿̔̋͐͂̉̚̕̕ ̶̡̙̱̰͙̟͔̙̭̻̗̯͗͐̓͑˙̷͉̱͙͇͍̦̣̬̦̮̣͎͎̺̃̅̃͋̊̾̓́͐͜͝˙̷̡̛̮̰̝̬͉̭̱̹˙̸͕̜͕͕̦̩̮͇̩̥̖̘̣̻̽̽́͌̂̌̇̓̃̎́͗̓̀̚ʎ̸̛͔͈̌̔̽͛̽͊̋̑̚ɥ̴̻̯̻̺̯͐̄̊̌̀͋̔͛̚̕̕ʍ̵̤̽͌͝ ̸̞̝̰̳̋̈́́̓̅̑̌̄̍́͠͝ͅɹ̴̡̛͉̖̪̉̾͒̾͆̿́̂̏̀͘͝ǝ̸̛̙̻͇͂̆̈́̑͂̒͑͝p̴̧̖̭͖̩̳̖̥̬̑́̏̃̒͒͒͂͊̎͗u̷̘̗̞̹͋̂̀͑͛̆̅̇̾̇͋͘̕͠õ̵̢̨͖̼͋̈́̈́̃̓̈̊̉̒̑̚̚͘͠ʍ̴̻̙͉̼̳̯͕͓͔̹̯̄̍̂̏̑̈̓͒̄̽̎̚ ̷̦̲̮͉̝̭̌́̆̎̈̂̑̀͐̚͝͠ͅn̶̢̢͔͍͍̬͔̪̩̺̦̟͚͙͂͗͛͛̒ͅõ̸̧̘͖̘̥̩͔̎̐̿̕ʎ̶̨̱̮̩̪̫̺̗͆̇́̋̉̿͂̾̃͋̎̐̚͝ ̵̡̮̳̹̥̗̣̤̭̔̒̋̎̋̈́͒̍͐̅̆̈́p̷͖̱̼̭̖̳̳̙̝̗̮̰̭̓́̍ủ̴̥͇͎̣͉̿̎∀̵̖͉͇͉̽̓
- Valleri45
- Scratcher
500+ posts
Elif (else-if) block
elif looks like this:
if <> then
else
else
else
end
this is my siggy, highlight this and ctrl + shift + down to view the rest
propose your OC to be featured here! -> propose now
my OC will tell you how good it is. ->click here to see my OC<- his name is triangle guy.
if anyone comments “clover” on my porfile… i dont care if you comment that on it.
Spring - A Platformer Series
My Hotel
_________________________________________________________
- cooldude-222
- Scratcher
100+ posts
Elif (else-if) block
nvm
Last edited by cooldude-222 (March 7, 2022 15:55:37)
Have a nice day!
- ideapad-320
- Scratcher
1000+ posts
Elif (else-if) block
Many languages have this! 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.
Also
if <[likes v] contains [dogs]> thenis different from those 2 with identical behavior:
say [i like dogs!]
end
if <[likes v] contains [cats]> then
say [i like cats!]
end
if <[likes v] contains [birds]> then
say [i like birds!]
end
if <[likes v] contains [bunnies]> then
say [i like bunnies!]
end
if <[likes v] contains [hamsters]> then
say [i like hamsters!]
end
if <[likes v] contains [chickens]> then
say [i like chickens!]
else
say [no known likes.]
end
if <[likes v] contains [dogs]> thenand
say [i like dogs!]
else
if <[likes v] contains [cats]> then
say [i like cats!]
else
if <[likes v] contains [birds]> then
say [i like birds!]
else
if <[likes v] contains [bunnies]> then
say [i like bunnies!]
else
if <[likes v] contains [hamsters]> then
say [i like hamsters!]
else
if <[likes v] contains [chickens]> then
say [i like chickens!]
else
say [no known likes.]
end
end
end
end
end
end
if <[likes v] contains [dogs]> then{
say [i like dogs!]
}else if <[likes v] contains [cats]> then{
say [i like cats!]
}else if <[likes v] contains [birds]> then{
say [i like birds!]
} else if <[likes v] contains [bunnies]> then{
say [i like bunnies!]
} else if <[likes v] contains [hamsters]> then{
say [i like hamsters!]
} else if <[likes v] contains [chickens]> then{
say [i like chickens!]
} else {
say [no known likes.]
}::control
This is my siggy.
Can't wait for FRC water game!
- LAVEna_THe_NicE_Guy
- Scratcher
54 posts
Elif (else-if) block
this could be confusing to some scratche
click this to see an animation series evar with best spelling!!1!!!!1!
when green flag clicked
if ((bob)=(ob)) then
Display [yes]:: looks
else
Display [wromg]:: looks
set [bob v] to [ob]
end
- qwerty_wasd_gone
- Scratcher
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
Last edited by qwerty_wasd_gone (Oct. 14, 2022 00:46:16)
shift+ctrl+down arrow to scroll
I may sometimes make mistakes, change my mind, etc., and edit my posts
When (::red) clicked :: events hat
repeat until <key [all v] pressed?>{
destroy this sprite::control cap
when @greenFlag misclicked::events hat
become idiot::custom}::control
(╯°□° ╯︵ ┻━┻::red)::#000000 reporter//this is brad, he creates cursed scripts like the one you saw above
(ㆆ_ㆆ)//this is max, he stares at you with that expression if you say you don't support my suggestion
You found me
- PkmnQ
- Scratcher
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
the symbols nobody knows about but are very useful: @delInput @addInput :: grey
This is an account that exists.
Here, have a useful link:
The Official List of Rejected Suggestions by Za-Chary