Discuss Scratch

frdsaw
Scratcher
7 posts

Elif (else-if) block

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)

Check me out!
if <(frdsaw) = [EPIC!]> then
wait (0) secs
forever
PARTY!!!
end
end
AonymousGuy
Scratcher
1000+ posts

Elif (else-if) block

What would this look like? Would it be multiple ifs part of one block?
mathfreak231
Scratcher
1000+ posts

Elif (else-if) block

(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…

Last edited by mathfreak231 (July 18, 2015 14:06:11)


3DS FC: 3239-6065-2543 (Ask me before adding) | AS: Alex~ | X: Alex (DWS)
Ask me on my profile about XYORAS breeding requests!

My browser / operating system: MacOS Macintosh X 10.11.3, Safari 9.0.3, Flash 20.0 (release 0)
turkey3_test
Scratcher
1000+ posts

Elif (else-if) block

when gf clicked
else
if (condition)

ProdigyZeta7
Scratcher
1000+ posts

Elif (else-if) block

if <>
else <>
else <>
end
Ah, there we go.

So how would this be made, exactly? Would there be (+) at the bottom part of the loop so when it's clicked the above happens? I support.



jontmy00
Scratcher
500+ posts

Elif (else-if) block

I support, and ProdigyZeta7, that would actually be quite a useful feature!

It'd be nice if there were a feature like that for “and”, “or”, and so on sort of blocks.

Hello.
frdsaw
Scratcher
7 posts

Elif (else-if) block

How do I do a model of the block?

Check me out!
if <(frdsaw) = [EPIC!]> then
wait (0) secs
forever
PARTY!!!
end
end
scimonster
Scratcher
1000+ posts

Elif (else-if) block

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
...

Retired Community Moderator
BTW, i run Google Chrome 41.0.2272.101 on a Linux system - Ubuntu 14.04. NEW: iPad 4th gen. w/retina.

418 I'm a teapot (original - to be read by bored computer geeks)
THE GAME (you just lost)
; THE SEMICOLON LIVES ON IN OUR SIGS
gravtest
Scratcher
100+ posts

Elif (else-if) block

mathfreak231 wrote:

First of all, nobody calls it Elif
Python, C?

Sci's right, as always

mathfreak231
Scratcher
1000+ 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.
Oh. Well I've never seen it before in Python (probably because I barely read Python or many other scripting languages at all; I'm a Lua person because I'm a Robloxian).

3DS FC: 3239-6065-2543 (Ask me before adding) | AS: Alex~ | X: Alex (DWS)
Ask me on my profile about XYORAS breeding requests!

My browser / operating system: MacOS Macintosh X 10.11.3, Safari 9.0.3, Flash 20.0 (release 0)
frdsaw
Scratcher
7 posts

Elif (else-if) block

if <>
else <>
else<+> <->
end

This, but with the second to last “else” to be “elif”, and the last else to be removed, also the + and - to be buttons.

Last edited by frdsaw (Dec. 4, 2013 16:45:25)


Check me out!
if <(frdsaw) = [EPIC!]> then
wait (0) secs
forever
PARTY!!!
end
end
AonymousGuy
Scratcher
1000+ posts

Elif (else-if) block

oh, elseif. I'm not very smart!

Yes, I think this could be a good idea.
cwrivera99
Scratcher
500+ posts

Elif (else-if) block

ProdigyZeta7 wrote:

if <>
else <>
else <>
end
Ah, there we go.

So how would this be made, exactly? Would there be (+) at the bottom part of the loop so when it's clicked the above happens? I support.
If < > Then

Else
If < > Then

Else

Last edited by cwrivera99 (Dec. 6, 2013 18:43:09)


when this block is clicked::sensing hat//FYI, this is my old account that I no longer use. My current account is @DaSpudLord.
forever {do (a [scratch v]::events ring)::sound}::extension cstart
say [what the...?] in (the language of [the moon people v]::red)::control
create [spontaneous v] explosion in [a flea's stomach]::motion
That's not right...::cend
If you are reading this… Then congratulations! You have found the part of my signature that was eaten by a kumquat! (On a side note, you are probably in a kumquat's stomach.) Now get out of the kumquat's stomach and go do something productive with your life. Like playing this game over and over again. Very productive.
lucs100
Scratcher
10 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
...

Well, in this Project that I made, using that many else / if blocks was extremely annoying and painstaking. To give the user more chances before crashing (see inside the project) would make it 12 or more else / if blocks thick!

(Scratch)= amazing

if <(Scratch)= amazing> then
forever
use Scratch
end

end

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$$%%%+;
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Powered by DjangoBB

Standard | Mobile