Discuss Scratch

Vercte
Scratcher
500+ posts

Comment Blocks

Basic88 wrote:

Is this what you mean?
From what I understand, that's what @HTML-Fan means.
But you can still clarify.
TheColaber
Scratcher
500+ posts

Comment Blocks

Basic88 wrote:

Comment Blocks? I don't understand this much :P
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

Yeah, sure:
https://pic.useful.fi/zIz_ITE0s.png
TheColaber
Scratcher
500+ posts

Comment Blocks

Basic88 wrote:

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

qrcool wrote:

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

qrcool wrote:

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.
TheColaber
Scratcher
500+ posts

Comment Blocks

bump… don't quote this… bad things happen…
Byron_Inc
Scratcher
1000+ posts

Comment Blocks

Workaround:
define comment 1
if < (1) = (0) > then // so it skips
comments :: grey stack
end
stop [this script v]
when gf clicked
... :: grey stack
comment 1 // look up!
I know it's a little troublesome, but it's all I can think of. Maybe you can put it beside the main script?

EDIT: Fixed some logic errors.

Last edited by Byron_Inc (July 27, 2020 06:43:16)

the-joiner
Scratcher
100+ posts

Comment Blocks

TheColaber wrote:

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)
I support this
TheColaber
Scratcher
500+ posts

Comment Blocks

Byron_Inc wrote:

Workaround:
define comment 1
if < (1) = (0) > then // so it skips
comments :: grey stack
end
stop [this script v]
when gf clicked
... :: grey stack
comment 1 // look up!
I know it's a little troublesome, but it's all I can think of. Maybe you can put it beside the main script?

EDIT: Fixed some logic errors.
Uh… this isn't it… my OP was stating to have the option to have blocks in a comment like this:

The end result would be something like this:
TheColaber
Scratcher
500+ posts

Comment Blocks

bump
TheColaber
Scratcher
500+ posts

Comment Blocks

Bump
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.
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

thr565ono wrote:

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.
If in a comment, it will not run. Btw, how would this confuse people, all programming languages allow you to comment code…
TheColaber
Scratcher
500+ posts

Comment Blocks

donotforgetmycode wrote:

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.
TheColaber
Scratcher
500+ posts

Comment Blocks

bump… it's been a while hasn't it?
TheColaber
Scratcher
500+ posts

Comment Blocks

bump

Powered by DjangoBB