Discuss Scratch
- Discussion Forums
- » Suggestions
- » Custom Blocks with a Return Value
- r1j7r
-
1 post
Custom Blocks with a Return Value
Many languages use procedures with return values.
Similar to the way
Then, call to the procedure could be used in a
This language is often used in the AP Computer Science Principles course for students who have no prior programming experience, and part of the requirements of that course are a knowledge of return values.
A good way to handle that in scratch would be to make an option for the procedure to have an output value and the resulting block call becomes and oval rather than a puzzle piece.
This also prevents the bad programming practice of changing global variable values within a procedure.
Similar to the way
is a built in procedure with a return value, it would be nice to be able to use a custom block in this way.
Then, call to the procedure could be used in a
command or in a
operation or any other way that a value can be used in a program.
This language is often used in the AP Computer Science Principles course for students who have no prior programming experience, and part of the requirements of that course are a knowledge of return values.
A good way to handle that in scratch would be to make an option for the procedure to have an output value and the resulting block call becomes and oval rather than a puzzle piece.
This also prevents the bad programming practice of changing global variable values within a procedure.
- gdfsgdfsgdfg
-
1000+ posts
Custom Blocks with a Return Value
SIGH..
https://scratch.mit.edu/discuss/topic/20661
the op is talking about
Many languages use procedures with return values.
Similar to the wayis a built in procedure with a return value, it would be nice to be able to use a custom block in this way.
Then, call to the procedure could be used in acommand or in aoperation or any other way that a value can be used in a program.
This language is often used in the AP Computer Science Principles course for students who have no prior programming experience, and part of the requirements of that course are a knowledge of return values.
A good way to handle that in scratch would be to make an option for the procedure to have an output value and the resulting block call becomes and oval rather than a puzzle piece.
This also prevents the bad programming practice of changing global variable values within a procedure.
- blablablahello
-
1000+ posts
Custom Blocks with a Return Value
“#1: CUSTOM REPORTER BLOCKS”SIGH..
https://scratch.mit.edu/discuss/topic/20661
the op is talking aboutMany languages use procedures with return values.
Similar to the wayis a built in procedure with a return value, it would be nice to be able to use a custom block in this way.
Then, call to the procedure could be used in acommand or in aoperation or any other way that a value can be used in a program.
This language is often used in the AP Computer Science Principles course for students who have no prior programming experience, and part of the requirements of that course are a knowledge of return values.
A good way to handle that in scratch would be to make an option for the procedure to have an output value and the resulting block call becomes and oval rather than a puzzle piece.
This also prevents the bad programming practice of changing global variable values within a procedure.
im preeeetty sure thats literally this (although they do give extra reasons thats good)
- medians
-
1000+ posts
Custom Blocks with a Return Value
Yes I know, which is the same thing as better custom blocks. By procedures they mean custom blocks.SIGH..
https://scratch.mit.edu/discuss/topic/20661
the op is talking about
long quote
- owlover2010
-
100+ posts
Custom Blocks with a Return Value
Support! Snap! works this way and I think Scratch should too. It wouldn't make any changes to existing projects.
- medians
-
1000+ posts
Custom Blocks with a Return Value
Uhm:
SIGH..
https://scratch.mit.edu/discuss/topic/20661
- Discussion Forums
- » Suggestions
-
» Custom Blocks with a Return Value