Discuss Scratch
- TheColaber
-
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
-
500+ posts
Comment Blocks
Yes, you are correct, but just know that u could also add text. Is this what you mean?
- qrcool
-
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
-
500+ posts
Comment Blocks
1. No, you just drag the blocks in 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?
2. The same way when you have multiple scripts close together.
- qrcool
-
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
-
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
-
500+ posts
Comment Blocks
Yes, exactly. 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?
- Byron_Inc
-
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
-
100+ posts
Comment Blocks
I support this As you may know…
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://mv-ezproxy-com.ezproxyberklee.flo.org/get_image/project/413020675_200x180.png
What do you think… Support, or No Support and why? (support recommended)
- TheColaber
-
500+ posts
Comment Blocks
Uh… this isn't it… my OP was stating to have the option to have blocks in a comment like this: Workaround: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
-
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
-
1000+ posts
Comment Blocks
I don't really see how this would be useful, so I semi-support.
- TheColaber
-
500+ posts
Comment Blocks
If in a comment, it will not run. Btw, how would this confuse people, all programming languages allow you to comment code… 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.
- TheColaber
-
500+ posts
Comment Blocks
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. I don't really see how this would be useful, so I semi-support.