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

#1 2011-10-05 21:11:21

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Functions.

I would dearly like functions.

Like functions like this:
http://img607.imageshack.us/img607/6503/functions.gif


Where the function is defined in the context then launched.

Would make programming readable (no hidden definitions!) but more flexible (I'd have hundreds for OSes/AIs and maybe a couple for normal coding).

Get it?  big_smile


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#2 2011-10-06 03:18:49

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Functions.

That's the exact same thing as broadcast.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#3 2011-10-06 10:51:16

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: Functions.

Yes,that is the same as broadcast  sad


http://blocks.scratchr.org/API.php?user=KrIsMa&action=onlineStatus&online=http://i49.tinypic.com/2pzic0m.png&offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#4 2011-10-06 11:07:12

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

Offline

 

#5 2011-10-06 11:30:18

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Functions.

Agreed. This would be awesome.  big_smile

Offline

 

#6 2011-10-06 13:57:30

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Functions.

WindowsExplorer wrote:

That's the exact same thing as broadcast.

No it isn't, broadcasts can't take inputs (have variables that are purely local to the function and are defined when the function is called), return values (be an oval block), allow recurrsion (having functions call themselves without inturupting the current execution) or be atomic (all the other scripts will wait before it is finnished). Also, this WILL happen in 2.0, but not with the same interface. click herefor more details.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

Board footer