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

#1 2009-04-05 08:50:34

TheEight-BitLink
Scratcher
Registered: 2009-03-20
Posts: 8

'Goto' Blocks (or 'go to')

They would go around all the blocks to the right , interrupting a certain part of the program and jumping over another.

Offline

 

#2 2009-04-05 14:13:43

boinoinoi
Scratcher
Registered: 2007-06-05
Posts: 500+

Re: 'Goto' Blocks (or 'go to')

This isn't very clear...
Do you mean:
A block which would jump to another part of the same script?

Kind of like the GOTO command in BASIC

Last edited by boinoinoi (2009-04-05 14:13:50)


http://i30.tinypic.com/335fpxx.jpg
"Boinoinoi is the only person on the forums that I expect to be wearing a monocle all the time behind that screen, so I'm sure being as classy as he is, he knows what he's doing"        http://myfastcounter.com/count.php?c_style=88&id=1284259111http://myfastcounter.com/count.php?c_style=88&id=1286068127

Offline

 

#3 2009-04-05 14:19:26

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: 'Goto' Blocks (or 'go to')

Oh you mean like the basic command. I dunno, that may mess up some people's code.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#4 2009-04-05 14:20:52

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: 'Goto' Blocks (or 'go to')

I don't see how a GOTO block would work by itself...you would need some means of identifying the target, a label of some sort.  I wouldn't recommend adding this feature anyway...it tends to lead to very unstructured and hard to read programs.

What we could use, though, would be some way to break out of the middle of loops!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#5 2009-04-05 14:54:56

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: 'Goto' Blocks (or 'go to')

Paddle2See wrote:

I don't see how a GOTO block would work by itself...you would need some means of identifying the target, a label of some sort.  I wouldn't recommend adding this feature anyway...it tends to lead to very unstructured and hard to read programs.

What we could use, though, would be some way to break out of the middle of loops!

Like [blocks]<stop script>[/blocks], except it only stops the current loop, skipping to whatever's below it?

EDIT: Heh heh, 500th post  big_smile

Last edited by technoguyx (2009-04-05 14:55:30)


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#6 2009-04-05 20:39:22

TheEight-BitLink
Scratcher
Registered: 2009-03-20
Posts: 8

Re: 'Goto' Blocks (or 'go to')

boinoinoi wrote:

This isn't very clear...
Do you mean:
A block which would jump to another part of the same script?

Kind of like the GOTO command in BASIC

Yeah, sorta. There would be two parts to it, and it could jump to any part of any script in a sprite.

Offline

 

#7 2009-04-05 21:41:55

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: 'Goto' Blocks (or 'go to')

GOTO?

Bad idea.  Sorry, I can't support this one.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#8 2009-04-06 04:53:22

tomgalaxyzoo
Scratcher
Registered: 2009-03-28
Posts: 100+

Re: 'Goto' Blocks (or 'go to')

It is a bad idea. GOTO just makes programs messier and harder to read.


<forever> Galaxy Zoo!
smile  smile  smile  smile  woof woof!  smile  sad  big_smile  yikes  wink  hmm  tongue  lol  mad  roll  cool

Offline

 

#9 2009-04-14 15:54:38

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: 'Goto' Blocks (or 'go to')

Oh no... Not just another "What about GOTO" discussion, like on *all* basic forums...

Scratch works parallel, goto just doesn't fits into the Scratch programming language.


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#10 2009-04-19 01:07:50

Dibbo222
Scratcher
Registered: 2007-11-03
Posts: 100+

Re: 'Goto' Blocks (or 'go to')

Paddle2See wrote:

What we could use, though, would be some way to break out of the middle of loops!

YESSSS!!!!!!!!!!!!!!!!!!!!! i find myself putting this script in between every action in the loop.

<if> <(<{ Stop?   }> <=>1)>

<stop script>
<end>

i suggest a block that is like a "forever if ____" block but it says at the top "forever, but stop when ____"


The biggest tower defense game on Scratch?
http://scratch.mit.edu/projects/Dibbo222/929092

Offline

 

#11 2009-04-19 11:52:39

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: 'Goto' Blocks (or 'go to')

Dibbo222 wrote:

Paddle2See wrote:

What we could use, though, would be some way to break out of the middle of loops!

YESSSS!!!!!!!!!!!!!!!!!!!!! i find myself putting this script in between every action in the loop.

<if> <(<{ Stop?   }> <=>1)>

<stop script>
<end>

i suggest a block that is like a "forever if ____" block but it says at the top "forever, but stop when ____"

<repeat until>
<end>[/blocks]

I think that works well.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#12 2009-04-19 12:05:49

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: 'Goto' Blocks (or 'go to')

Like "exit for" in basic... But I think you can achive all those things zith variables and repeat until already...


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#13 2009-04-19 12:46:46

KingOfGames
Scratcher
Registered: 2009-03-28
Posts: 100+

Re: 'Goto' Blocks (or 'go to')

GOTO would not work. It would mess me up in Scratch ! Oh yea, if any one saw my two last posts somewhere, it was my stupid anger at the door. I sprained my ankle so ya...

Offline

 

Board footer