This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2011-04-21 17:06:16

Hamsterman486
Scratcher
Registered: 2011-02-04
Posts: 21

Re: If, if, else Block

support


http://i.imgur.com/WmJpL.gif  I like Pie, therefor, I rock.

Offline

 

#27 2011-04-22 10:49:48

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: If, if, else Block

i think this is exactly like the switch in java:

Code:

String month=7;
String monthString = null;
switch (month) {
            case 1:  monthString = "January";       break;
            case 2:  monthString = "February";      break;
            case 3:  monthString = "March";         break;
            case 4:  monthString = "April";         break;
            case 5:  monthString = "May";           break;
            case 6:  monthString = "June";          break;
            case 7:  monthString = "July";          break;
            case 8:  monthString = "August";        break;
            case 9:  monthString = "September";     break;
            case 10: monthString = "October";       break;
            case 11: monthString = "November";      break;
            case 12: monthString = "December";      break;
            default: monthString = "Invalid month"; break;
        }
Systeem.out.println"the month is " + monthString + "!";

and the way to remember x and y is x = a cross

Last edited by TRocket (2011-04-22 11:41:54)


http://i.imgur.com/1QqnHxQ.png

Offline

 

#28 2011-04-22 10:55:35

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: If, if, else Block

TRocket wrote:

i think this is exactly like the switch in java:

Code:

switch (month) {
            case 1:  monthString = "January";       break;
            case 2:  monthString = "February";      break;
            case 3:  monthString = "March";         break;
            case 4:  monthString = "April";         break;
            case 5:  monthString = "May";           break;
            case 6:  monthString = "June";          break;
            case 7:  monthString = "July";          break;
            case 8:  monthString = "August";        break;
            case 9:  monthString = "September";     break;
            case 10: monthString = "October";       break;
            case 11: monthString = "November";      break;
            case 12: monthString = "December";      break;
            default: monthString = "Invalid month"; break;
        }

and the way to remember x and y is x = a cross

Yeah, I think so.
@end: What?

Offline

 

#29 2011-04-23 15:14:45

TVflea
Scratcher
Registered: 2010-08-14
Posts: 1000+

Re: If, if, else Block

tvflame wrote:

Rexpup wrote:

TVflea wrote:


almost everyone knows X and Y unless you are in 3rd grade

Although I think that Scratchers should learn about X and Y, I don't think you should call people 3rd graders.

TheSaint wrote:

While this is slightly useful, it won't be a priority because it can be done using the nesting feature. But I agree, it would be nice to have.

So, do you support?

i do!

yay!


-iNetMaster-'s not dead, get used to it. ! big_smile .
http://is.gd/YrQzXX

Offline

 

#30 2011-04-26 17:29:30

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

ssss wrote:

I kinda support.

But not as priority

That's fine.

GarSkutherGirl wrote:

SUPPORT. This would be useful in those 1-sprite-1-script games. 
OT: I'm going to the mall today. :3

Yeah,That's why I want it.

scimonster wrote:

I like it.
Why do you write in colors like that?

Thanks.  Cuz I can and it's free. Well, actually, I just want to stand out on the forums.  Also, I like coding things with script.

ProgrammingFreak wrote:

I was going to code this block!  big_smile

With boyb?

williambl wrote:

Great! Even though I LIKE nesting [blocks] <if> <else> <end> <if> <else> <end> <if> <else> <end> [/blocks]

Ok.


http://i.imgur.com/QQH4J.gif

Offline

 

#31 2011-04-26 19:15:38

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

I like color!!!

Last edited by Rexpup (2011-04-26 19:15:50)


http://i.imgur.com/QQH4J.gif

Offline

 

#32 2011-04-27 15:38:47

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

scimonster wrote:

TRocket wrote:

i think this is exactly like the switch in java:

Code:

switch (month) {
            case 1:  monthString = "January";       break;
            case 2:  monthString = "February";      break;
            case 3:  monthString = "March";         break;
            case 4:  monthString = "April";         break;
            case 5:  monthString = "May";           break;
            case 6:  monthString = "June";          break;
            case 7:  monthString = "July";          break;
            case 8:  monthString = "August";        break;
            case 9:  monthString = "September";     break;
            case 10: monthString = "October";       break;
            case 11: monthString = "November";      break;
            case 12: monthString = "December";      break;
            default: monthString = "Invalid month"; break;
        }

and the way to remember x and y is x = a cross

Yeah, I think so.
@end: What?

Sorry, but I don't program Java.


http://i.imgur.com/QQH4J.gif

Offline

 

#33 2011-04-27 15:52:12

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

Hamsterman486 wrote:

support

Support? YAY!!!


http://i.imgur.com/QQH4J.gif

Offline

 

#34 2011-04-27 16:33:39

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: If, if, else Block

TRocket wrote:

i think this is exactly like the switch in java:

Code:

String month=7;
String monthString = null;
switch (month) {
            case 1:  monthString = "January";       break;
            case 2:  monthString = "February";      break;
            case 3:  monthString = "March";         break;
            case 4:  monthString = "April";         break;
            case 5:  monthString = "May";           break;
            case 6:  monthString = "June";          break;
            case 7:  monthString = "July";          break;
            case 8:  monthString = "August";        break;
            case 9:  monthString = "September";     break;
            case 10: monthString = "October";       break;
            case 11: monthString = "November";      break;
            case 12: monthString = "December";      break;
            default: monthString = "Invalid month"; break;
        }
Systeem.out.println"the month is " + monthString + "!";

and the way to remember x and y is x = a cross

I agree, Scratch needs a switch.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#35 2011-04-27 16:38:10

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

markyparky56 wrote:

I agree, Scratch needs a switch.

I can program "some" in Flash, but can do fairly good graphics. I'd like there to be a .fla file for Scratch, so that everyone can add.  Hey, I'll write a new topic about it.


http://i.imgur.com/QQH4J.gif

Offline

 

#36 2011-05-08 13:15:54

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

Have any comments?


http://i.imgur.com/QQH4J.gif

Offline

 

#37 2011-05-09 17:28:58

Hamsterman486
Scratcher
Registered: 2011-02-04
Posts: 21

Re: If, if, else Block

Rexpup wrote:

Hamsterman486 wrote:

support

Support? YAY!!!

YAY  big_smile


http://i.imgur.com/WmJpL.gif  I like Pie, therefor, I rock.

Offline

 

#38 2011-05-09 18:09:29

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

Hamsterman486 wrote:

Rexpup wrote:

Hamsterman486 wrote:

support

Support? YAY!!!

YAY  big_smile

Yay.


http://i.imgur.com/QQH4J.gif

Offline

 

#39 2011-05-16 18:39:31

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

Does anyone care?


http://i.imgur.com/QQH4J.gif

Offline

 

#40 2011-05-16 21:04:52

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: If, if, else Block

Sorry to restate this but yes the <[]and/or[]> boolean would do the same job.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#41 2011-05-17 05:14:00

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: If, if, else Block

jji7skyline wrote:

Sorry to restate this but yes the <[]and/or[]> boolean would do the same job.

Did you read it?

Offline

 

#42 2011-05-17 11:27:29

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: If, if, else Block

This is a great block, it is not able to be done in scratch currently because even with a bunch of ifs and an if else, it will not work the same, for instance, if a variable changes in one of them, which would make another script run, it wont act the same. Also if they did end up making this, the plus and minus buttons may be able to go on other blocks like or and = - + * / etc.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#43 2011-05-17 11:29:15

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: If, if, else Block

TRocket wrote:

and the way to remember x and y is x = a cross

LOL, I never thought about x i a cross. (or across)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#44 2011-05-18 09:32:35

nuckelavee
Scratcher
Registered: 2011-05-18
Posts: 79

Re: If, if, else Block

scimonster wrote:

jji7skyline wrote:

Sorry to restate this but yes the <[]and/or[]> boolean would do the same job.

Did you read it?

I don't really think so.  I'd like to see this block, because of a very annoying game that I am making.


Scratch 2.0- announced April 19, 2010, and now in alpha!  It looks cool, and finally has cloning  smile  Yay.

Offline

 

#45 2011-05-18 10:08:11

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: If, if, else Block

I actually don't support, because
a) It'll be a pain to add for the ST
b) It can be replicated easily


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#46 2011-05-18 14:31:06

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: If, if, else Block

Hardmath123 wrote:

I actually don't support, because
a) It'll be a pain to add for the ST
b) It can be replicated easily

DON'T YOU SEE! YOU CANT REPLACE IT! ITS AS REPLACEABLE AS THE IF ELSE BOOLEAN! (Actually harder to replace.)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#47 2011-05-18 16:38:31

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

Pecola1 wrote:

Hardmath123 wrote:

I actually don't support, because
a) It'll be a pain to add for the ST
b) It can be replicated easily

DON'T YOU SEE! YOU CANT REPLACE IT! ITS AS REPLACEABLE AS THE IF ELSE BOOLEAN! (Actually harder to replace.)

Both of hardmath123's points contridict each other.


http://i.imgur.com/QQH4J.gif

Offline

 

#48 2011-05-18 17:09:33

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: If, if, else Block

Rexpup wrote:

Pecola1 wrote:

Hardmath123 wrote:

I actually don't support, because
a) It'll be a pain to add for the ST
b) It can be replicated easily

DON'T YOU SEE! YOU CANT REPLACE IT! ITS AS REPLACEABLE AS THE IF ELSE BOOLEAN! (Actually harder to replace.)

Both of hardmath123's points contridict each other.

Not really. The type of block you're looking for would require some new coding to match the block "extension" properties of those in BYOB - possible, but somewhat more difficult than just making a new blockspec. Still, I think this would be worth the time.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#49 2011-05-18 17:14:21

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: If, if, else Block

Harakou wrote:

Rexpup wrote:

Pecola1 wrote:


DON'T YOU SEE! YOU CANT REPLACE IT! ITS AS REPLACEABLE AS THE IF ELSE BOOLEAN! (Actually harder to replace.)

Both of hardmath123's points contridict each other.

Not really. The type of block you're looking for would require some new coding to match the block "extension" properties of those in BYOB - possible, but somewhat more difficult than just making a new blockspec. Still, I think this would be worth the time.

me too


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#50 2011-05-18 18:16:30

nuckelavee
Scratcher
Registered: 2011-05-18
Posts: 79

Re: If, if, else Block

Pecola1 wrote:

Harakou wrote:

Rexpup wrote:


Both of hardmath123's points contridict each other.

Not really. The type of block you're looking for would require some new coding to match the block "extension" properties of those in BYOB - possible, but somewhat more difficult than just making a new blockspec. Still, I think this would be worth the time.

me too

It's for Scratch 2.0, not for BYOB.


Scratch 2.0- announced April 19, 2010, and now in alpha!  It looks cool, and finally has cloning  smile  Yay.

Offline

 

Board footer