Discuss Scratch

fariddiah
Scratcher
2 posts

FUNCTION and PROCEDURE

does scratch have built in function?
isthisausername
Scratcher
100+ posts

FUNCTION and PROCEDURE

Yes; If you go to the More Blocks section of the code editor and click the Make a Block button, you can define the arguments for the new block. After clicking OK, a header block for that custom block appears, and you can put the code that is executed when the block is called in there.
powercon5
Scratcher
1000+ posts

FUNCTION and PROCEDURE

isthisausername wrote:

Yes; If you go to the More Blocks section of the code editor and click the Make a Block button, you can define the arguments for the new block. After clicking OK, a header block for that custom block appears, and you can put the code that is executed when the block is called in there.
I believe they might mean custom reporters.

Sadly you can't have a custom block return a value yet other than putting in in a variable. Hopefully this will be in Scratch 3.0.
fariddiah
Scratcher
2 posts

FUNCTION and PROCEDURE

what i mean is…
i already know that we can define and make our own Function block in More Blocks.
but is there any built in function (that can accept parameter and also return a value) that scratch have built in ready for use?

im trying to compare this concept of programming…
many programming language have built in function (like Standard Library function to do some specific task).
such as sqrt(), math.add()
unormal
Scratcher
5 posts

FUNCTION and PROCEDURE

fariddiah wrote:

what i mean is…
i already know that we can define and make our own Function block in More Blocks.
but is there any built in function (that can accept parameter and also return a value) that scratch have built in ready for use?

im trying to compare this concept of programming…
many programming language have built in function (like Standard Library function to do some specific task).
such as sqrt(), math.add()

scratch has that in the form of
[sqrt v] of ()
just click on the dropdown (little black arrow on the right of “sqrt”) to get a list of math functions.
click on one of the functions to change it to the function you clicked.

Powered by DjangoBB