(Created an article about procedures in 2.0.)
m (redirected instead of deleting)
(78 intermediate revisions by 31 users not shown)
Line 1: Line 1:
#REDIRECT [[My Blocks]]
{{redirect|Methods|Squeak methods|Squeak Tutorial#Methods}}
'''Procedures''', also called ''functions'' or ''methods'', are a function in many programming languages, which allow common blocks of code to be called simply. [[Blocks]] in Scratch are procedures themselves, as they are blocks compiled code.
==Procedures in Scratch==
[[File:Jump Block.png|thumb|A "jump" procedure.]][[File:Jump block with insert.png|thumb|A "jump" procedure with an argument.]]
In [[Scratch 2.0]], procedures will be implemented.<ref>http://blog.scratch.mit.edu/2011/03/scratch-20-progress-report-create-your.html</ref> There will be a "My Blocks" section, where procedures in the project are stored.<ref>http://blog.scratch.mit.edu/2012/02/scratch-20-project-page-and-project.html</ref> The procedures will be local to each [[sprite]].{{citation needed}} <!--It's somewhere on the forum thread about that blog post. I think it's by johnm. ~sci--> Procedures in Scratch 2.0 will only be [[Stack Blocks]], not Reporter or Boolean block styles. It remains to see whether they will be [[recursion|recursive]] or not. Procedures are expected to take [[arguments]].
==Procedures in Snap!==
[[Snap!]], previously called BYOB (Build Your Own Blocks), is a [[Scratch modification]] that allows procedures. Snap!'s procedures allow all 3 types of blocks, with arguments, and also recursion.
[[Category:Scratch Program]][[Category:Scratch 2.0]]

Latest revision as of 17:25, 6 January 2019

Redirect to: