Discuss Scratch
- TheColaber
-
Scratcher
500+ posts
Comment Blocks
Comment Blocks? I don't understand this much :PYeah, sure:
Like text based syntax?
function (what?)
–comment mwahaha
end
I see. Could you create a mockup so we can understand better? I don't know if I support
https://pic.useful.fi/zIz_ITE0s.png
- TheColaber
-
Scratcher
500+ posts
Comment Blocks
Is this what you mean?Yes, you are correct, but just know that u could also add text.
- qrcool
-
Scratcher
1000+ posts
Comment Blocks
Would this use the /scratchblocks plugin? I get the idea, but I'm a little confused on if it's possible to implement with the current layout. How would the editor detect if the block is just being put somewhere or if it's being put in a comment?
- TheColaber
-
Scratcher
500+ posts
Comment Blocks
Would this use the /scratchblocks plugin? I get the idea, but I'm a little confused on if it's possible to implement with the current layout. How would the editor detect if the block is just being put somewhere or if it's being put in a comment?1. No, you just drag the blocks in
2. The same way when you have multiple scripts close together.
- qrcool
-
Scratcher
1000+ posts
Comment Blocks
Ok. Probably possible, as similar detection code has been done before, but how would the transition from text to block and vice versa go? Would be like quotes on the forums, where it starts a new line?
- Paytronix
-
New Scratcher
60 posts
Comment Blocks
It would probably help people who know those programming languages and also want to learn Scratch (or vice versa) learn the (programming language) to Scratch function. Support.
- TheColaber
-
Scratcher
500+ posts
Comment Blocks
Ok. Probably possible, as similar detection code has been done before, but how would the transition from text to block and vice versa go? Would be like quotes on the forums, where it starts a new line?Yes, exactly.
- Byron_Inc
-
Scratcher
1000+ posts
Comment Blocks
Workaround:
EDIT: Fixed some logic errors.
define comment 1I know it's a little troublesome, but it's all I can think of. Maybe you can put it beside the main script?
if < (1) = (0) > then // so it skips
comments :: grey stack
end
stop [this script v]
when gf clicked
... :: grey stack
comment 1 // look up!
EDIT: Fixed some logic errors.
Last edited by Byron_Inc (July 27, 2020 06:43:16)
- the-joiner
-
Scratcher
100+ posts
Comment Blocks
As you may know…I support this
https://en.scratch-wiki.info/w/images/thumb/Scratch_3.0_Comment_Programming.PNG/320px-Scratch_3.0_Comment_Programming.PNG
… Currently in scratch, you can only comment text. I think it would be great to also be able to comment blocks, like in other programming languages… I guess in order to comment blocks, you could drag and drop them into a comment…
Here is a little example: (by @Basic88)
https://cdn2.scratch.mit.edu/get_image/project/413020675_200x180.png
What do you think… Support, or No Support and why? (support recommended)
- TheColaber
-
Scratcher
500+ posts
Comment Blocks
Workaround:Uh… this isn't it… my OP was stating to have the option to have blocks in a comment like this:define comment 1I know it's a little troublesome, but it's all I can think of. Maybe you can put it beside the main script?
if < (1) = (0) > then // so it skips
comments :: grey stack
end
stop [this script v]
when gf clicked
... :: grey stack
comment 1 // look up!
EDIT: Fixed some logic errors.
The end result would be something like this:

- thr565ono
-
Scratcher
100+ posts
Comment Blocks
There is an issue with this:
In the example above, there is a hat block there.
Should blocks in comments get executed? If no, that might confuse people. If yes, that kind of defeats the point of commenting the code to show, but not run it.
In the example above, there is a hat block there.
Should blocks in comments get executed? If no, that might confuse people. If yes, that kind of defeats the point of commenting the code to show, but not run it.
- donotforgetmycode
-
Scratcher
1000+ posts
Comment Blocks
I don't really see how this would be useful, so I semi-support.
- TheColaber
-
Scratcher
500+ posts
Comment Blocks
There is an issue with this:If in a comment, it will not run. Btw, how would this confuse people, all programming languages allow you to comment code…
In the example above, there is a hat block there.
Should blocks in comments get executed? If no, that might confuse people. If yes, that kind of defeats the point of commenting the code to show, but not run it.
- TheColaber
-
Scratcher
500+ posts
Comment Blocks
I don't really see how this would be useful, so I semi-support.This would be useful for testing things and writing comments about a snip of code. Plus, you can write and add blocks on the same comment above and under code.








