Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » FUNCTION and PROCEDURE
- isthisausername
-
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
-
1000+ posts
FUNCTION and PROCEDURE
I believe they might mean custom reporters. 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.
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
-
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()
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
-
5 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()
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.
- Discussion Forums
- » Questions about Scratch
-
» FUNCTION and PROCEDURE