Discuss Scratch

pokejofe
Scratcher
68 posts

Elif (else-if) block

Add me too your support too - I program in Java, and believe me - it makes code a lot neater

Generation 377: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment. I did not start this

Kumquats haven't eaten my signature! although I don't know what has…

Edit: I figured out what ate my signature! nothing. A bee stung it!
but I have seen some apples that looked like troublemakers hanging around it lately…
Tymewalk
Scratcher
1000+ posts

Elif (else-if) block

spike43884 wrote:

Ehh. the ifelseifelse would get messy to.
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 -

It's still less messy than nesting if-else blocks.

bold thing - italic thing - underlined thing - strikethrough thing
Birdlegs
Scratcher
1000+ posts

Elif (else-if) block

Back again for input. One thing I like about nesting is that it's very easy (Especially for beginners) to see why it works the way it does. This block sorta busts that, but I dunno. The current method, while it can get untidy in a sense, is a much better visual representation of the if/else process, showing it in a sequencing style most Scratchers will be easily familiar with.

Get a sweet lick of my new game right here! It's a tasty one!
TheUniversalWorld1
Scratcher
100+ posts

Elif (else-if) block

(+)
and
(-) :: sensing
signs in blocks besides
(() + ())
and
(() - ())
are not natural.

Last edited by TheUniversalWorld1 (June 1, 2015 01:41:16)


ƬΉΣЦПIVΣЯƧΛᄂЩӨЯᄂD1


Click here to support the
(user id :: sensing)
block!
Do it for me ;)
Pot-of-Gold
Scratcher
1000+ posts

Elif (else-if) block

Tymewalk wrote:

spike43884 wrote:

Ehh. the ifelseifelse would get messy to.
scratchblocks removed to take up less space

especially with the little + and -

It's still less messy than nesting if-else blocks.
Yeah, and it saves space.
NECROBUMP
support


Click to play
CGRises
Scratcher
500+ posts

Elif (else-if) block

I am fine with excessive if/else blocks. The else/if idea will get kids nowhere other than ???? Rd.

I
am childcritic
no longer forumposting
but still on on here
@speedyturtle has correctly guessed that the poem is a haiku.
AMV contest
purplebook163
Scratcher
500+ posts

Elif (else-if) block

No support. There are easy workarounds for this.



You can ask me anything, even if it's not Scratch related, on my profile. Use this cloud to write out cloud variables in the forums. ☁

Desktop: My browser/operating system: Windows 7, Firefox 38.0 and/or Chrome 43.0.2357.130, Flash 18.0 (release 0);
Dad's Laptop: My browser/operating system: Windows 7, Firefox 38.0 and/or Chrome, Flash 18.0 (release 0);
Tablet: My browser/operating system: Android Linux 4.4.2, Chrome 43.0.2357.93, No Flash version;
My Lapotop: , Flash 24.0 (release 0)

See a flappy bird game I made. Let me know if you beat my high score of 2!
Pot-of-Gold
Scratcher
1000+ posts

Elif (else-if) block

Yes the workaround is easy, but it can get messy:


Click to play
12424
Scratcher
65 posts

Elif (else-if) block

scimonster wrote:

mathfreak231 wrote:

First of all, nobody calls it Elif. It's “elseif” or “else if”.
Python users do, as that's the name of the Python keyword.

What's wrong with simply stacking if/elses?
if <...> then
...
else
if <...> then
...
else
if <...> then
...
else
if <...> then
...
else
...

Funny one

if <...> :: cstart
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else if <...> :: celse
...
else
...
end
// keep doing it until you like to reach else

My OS is : Windows 3.1 (Changed)



















... {... :: hat control} :: hat control // I bet you can't do that
... (... :: cap control) :: cap control // I bet you can't do that
Check This out
Please don't click here
http://www.pcjs.org/devices/pc/machine/5160/cga/256kb/win101/






























DO NOT CLICK HERE















Are We missing some or wrong? Don't worry
Ⓦⓐⓝⓣ ⓢⓞⓜⓔ ⓑⓤⓑⓑⓛⓔ ⓑⓐⓛⓛ ⓣⓔⓧⓣ ⓖⓞ ⓣⓞ : ⓗⓣⓣⓟ://ⓦⓦⓦ.ⓑⓤⓑⓑⓛⓔⓑⓐⓛⓛⓣⓔⓧⓣ.ⓒⓞⓜ
ɯoɔ˙ʇxǝʇuʍopǝpᴉsdn˙ʍʍʍ//:dʇʇɥ : oʇ oƃ ʇxǝʇ uʍop ǝpᴉsdn ǝɯos ʇuɐM
Want some rainbow text go to :
http://www.glitter-graphics.com/generators/rainbow.php
Ɯαит ƨσмɛ ƨcяαмвℓɛ∂ тɛϰт ɢσ тσ : нттρ://ωωω.ɢℓιттɛя-ɢяαρнιcƨ.cσм/ɢɛиɛяαтσяƨ/ƨcяαмвℓɛ.ρнρ
Click the image to download this (only for chrome)






http://i57.tinypic.com/wr11le.jpg




OS: Microsoft Codename Whistler
Flash Version: Flash 17.0 (release 0)
Browser: Firefox
Users: @click_follow_or_eat @peekaboo3
















and go to
http://atom.smasher.org/





Need help
if <(username) = [12424]> then
I will help you :: list
else
Ask (username) :: list
end
stickfire-test
Scratcher
100+ posts

Elif (else-if) block

Semi-support, it would make long nested if statements more compact in terms of editor space, but the workaround is quite easy.


DaSpudLord
Scratcher
1000+ posts

Elif (else-if) block

No support,stacking if-else blocks is really easy, and this might confuse new scratchers.


U^ェ^U::motion//This is Blocky. He lives in my signature. He is a trained attack block. He protects my siggy from kumquats.
Cream_E_Cookie
Scratcher
1000+ posts

Elif (else-if) block

DaSpudLord wrote:

No support,stacking if-else blocks is really easy, and this might confuse new scratchers.
These could confuse new scratchers (I'm just a alt. account)
([ v] of (9) :: operators)
(variable)
(list :: list)
Support, nesting if-else blocks could cause a lot of project space, and confusion.

















SpectacularGames
Scratcher
100+ posts

Elif (else-if) block

I support!
wizzwizz4
Scratcher
92 posts

Elif (else-if) block

SpectacularGames wrote:

I support!
Off-Topic: 378 generations?!? Are you sure that's a legitimate claim in your signature?
On-Topic:
if <> then :: control cstart
... :: grey
elseif <> then :: celse
... :: grey
else ((+ :: control) :: grey ring) :: celse
... :: grey
((- :: control) :: grey ring) :: cend
Is this a bad representation or what?

Last edited by wizzwizz4 (July 17, 2015 21:25:08)


If anyone's interested, I've been working on ScratchEdit! If you want to help, click here for things to help with.

A long time ago, wizzwizz4 wrote:

Generation 2: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment

Look at A quest (at best). Follow wizzwizz2 and wizzwizz4. Also, check out the Scratch Team! Or, you could create a magic custom block! Accurate sums without rounding from Scratch, three-dimensional rendering and Wave Mechanics. Dodge flying shapes
Image in Progress
            .,-:;//;:=,
. :H@@@MM@M#H/.,+%;,
,/X+ +M@@M@MM%=,-%HMMM@X/,
-+@MM; $M@@MH+-,;XMMMM@MMMM@+-
;@M@@M- XM@X;. -+XXXXXHHH@M@M#@/.
,%MM@@MH ,@%= .---=-=:=,.
=@#@@@MX ., -%HX$$%%%+;
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
ChocolatePi
Scratcher
1000+ posts

Elif (else-if) block

never mind

Last edited by ChocolatePi (July 17, 2015 20:27:17)

MathlyCat
Scratcher
1000+ posts

Elif (else-if) block

DaSpudLord wrote:

No support,stacking if-else blocks is really easy, and this might confuse new scratchers.
How is it confusing? When I was new I'm pretty sure I understood what “else” meant.

Think before you act.
Actions speek louder than words.

hi there fella
Cream_E_Cookie
Scratcher
1000+ posts

Elif (else-if) block

support btw

















Letsgopitt
Scratcher
500+ posts

Elif (else-if) block

DaSpudLord wrote:

(snip)this might confuse new scratchers.
Don't shoot ideas down just because they “might be confusing” to a certain demographic. Does that mean we should remove remixes, because if an inexperienced Scratcher attempts to remix one of griffpatch's projects, they might get confused? That makes zero sense, so don't use that to warrant no support.

I as for the multiple elses, how would this work? Would the next else go after the previous in is done? You could put them all in one else. Or would there be another if, making this block not work? No support.

Last edited by Letsgopitt (July 18, 2015 15:05:16)

mathfreak231
Scratcher
1000+ posts

Elif (else-if) block

@letsgopitt I updated my post, happy?

i have grown as a person. and ive grown, literally. none of my posts from before 2022 represent me accurately.
Letsgopitt
Scratcher
500+ posts

Elif (else-if) block

mathfreak231 wrote:

@letsgopitt I updated my post, happy?
Good, now you have actual justification.

Powered by DjangoBB