Discuss Scratch

k9lego
Scratcher
1000+ posts

Else If

AonymousGuy wrote:

firedrake969_test wrote:

Yeah, I'd do something like this

if

else if <> v x

else if <> v x

v to create another else/if, and x to remove that one.
That would probably be good. I made a mockup with a similar idea:
Ah, support!
ev3commander
Scratcher
500+ posts

Else If

ev3commander wrote:

blob8108 wrote:

Mockup, just for fun:
if <> then
else if <> then :: celse
else if <> then :: celse
end
EDIT: I think this would probably be a right-click menu option – “add condition” – if it were implemented.
if <> then
else if <> then v x :: celse
else if <> then v x :: celse
end
v and x are buttons to add and delete.
ev3commander
Scratcher
500+ posts

Else If

ev3commander wrote:

blob8108 wrote:

Mockup, just for fun:
if <> then
else if <> then :: celse
else if <> then :: celse
end
EDIT: I think this would probably be a right-click menu option – “add condition” – if it were implemented.
if <> then
else if <> then v x :: celse
else if <> then v x :: celse
end
or
if <> then
else if <> then ◀ ▶ :: celse
else if <> then ◀ ▶ :: celse
end
mathfreak231
Scratcher
1000+ posts

Else If

mathfreak231 wrote:

How about instead of arrows, there is a + and a -?
turkey3
Scratcher
1000+ posts

Else If

Support! The workaround makes scripts extremely fat width-wise.
blob8108
Scratcher
1000+ posts

Else If

ev3commander wrote:

if <> then
else if <> then ◀ ▶ :: celse
else if <> then ◀ ▶ :: celse
end
There would only be arrows on the last one. Or maybe *after* the last one, ie. on the “end” stub.
A-no-meep
Scratcher
100+ posts

Else If

mathfreak231 wrote:

mathfreak231 wrote:

How about instead of arrows, there is a + and a -?
That would be much more visible & clear.
davidkt
Scratcher
1000+ posts

Else If

My ideal mockup:
if <condition ::grey>
do something ::grey
else if <condition ::grey>::control celse
do something else ::grey
else if <condition ::grey> + - ::control celse
do something else ::grey
else
do something else ::grey
end
Maltese_Falcon
Scratcher
100+ posts

Else If

Wasn't there an “else if” block in 1.4? (My mind is forgetful…)

Anyway, I support.
bozman
Scratcher
73 posts

Else If

Maltese_Falcon wrote:

Wasn't there an “else if” block in 1.4? (My mind is forgetful…)

Anyway, I support.

I don't think there was…
turkey3
Scratcher
1000+ posts

Else If

Maltese_Falcon wrote:

Wasn't there an “else if” block in 1.4? (My mind is forgetful…)

Anyway, I support.
No
bozman
Scratcher
73 posts

Else If

Bumpity Bump.
VoltageGames
Scratcher
1000+ posts

Else If

Like the stuff in javascript? It would be obsolete. Just do

if <> then
else

if <> then

end
end
bozman
Scratcher
73 posts

Else If

VoltageGames wrote:

Like the stuff in javascript? It would be obsolete. Just do

if <> then
else

if <> then

end
end

The whole point of the block is making it so it doesn't need the huge stacking of ifs and elses and what not. the point is to make it more cleaned up and organized. Also, its not only used in JavaScript, its also used in Python.
dracae
Scratcher
1000+ posts

Else If

No support.
Find me a situation in which this block is used, and I'll find you a very simple solution that doesn't require YET ANOTHER extraneous block.
AonymousGuy
Scratcher
1000+ posts

Else If

dracae wrote:

No support.
Find me a situation in which this block is used, and I'll find you a very simple solution that doesn't require YET ANOTHER extraneous block.
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
ExtremeLogic
Scratcher
500+ posts

Else If

if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else

end

end

end

end

end

end
etc.
bozman
Scratcher
73 posts

Else If

I don't think you people are getting my point. I know It can be done through stacking blocks, but an else if block would just make the scripts look easier to comprehend for newer scratchers, and would allow for much more cleaner looking scripts.
fetchydog567
Scratcher
100+ posts

Else If


bozman wrote:

I don't think you people are getting my point. I know It can be done through stacking blocks, but an else if block would just make the scripts look easier to comprehend for newer scratchers, and would allow for much more cleaner looking scripts.
It's confusing for some people
else if <> then

end

Last edited by fetchydog567 (April 1, 2014 01:47:41)

fetchydog567
Scratcher
100+ posts

Else If

ExtremeLogic wrote:

if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else
if <> then
else

end

end

end

end

end

end
etc.
How did you switch up the colors in the blocks in your signature?

Powered by DjangoBB