Discuss Scratch
- bsteichman
-
Scratcher
500+ posts
multi line say blocks
What I am proposing is not a new block, but a modification to the existing say block. add a function for new lines!
right now we have the regular one-liner:

but what if we could do multiple lines in the say block?

(sorry for crude photoshop)
One option for this would be to do \n like every other programming language but I can see why that would be confusing, so why don't we just
have a reporter block that just returns enter?
If rewriting scratch to support new lines is too difficult (EX: lists), and it's only easy to do with say blocks, just have the symbol show up
“Hello⏎There!”
to be honest you don't even have to code the enter operator block, just have it do a new line when the string put into the say block has “⏎”
right now we have the regular one-liner:

but what if we could do multiple lines in the say block?

(sorry for crude photoshop)
One option for this would be to do \n like every other programming language but I can see why that would be confusing, so why don't we just
have a reporter block that just returns enter?
(⏎ :: operators) //returns a new lineso the use of it would look something like this:
say (join (join [Hello] (⏎ :: operators) ) [There!])
If rewriting scratch to support new lines is too difficult (EX: lists), and it's only easy to do with say blocks, just have the symbol show up
“Hello⏎There!”
to be honest you don't even have to code the enter operator block, just have it do a new line when the string put into the say block has “⏎”
- starlightsparker
-
Scratcher
1000+ posts
multi line say blocks
I feel that’s too much work just for another line - not for ST, for users.say (join (join [Hello] (⏎ :: operators) ) [There!])
Can’t it just be that you can type the return key
like
this
And then it shows up as another another line, and if you don’t use the return key it’s one line?
Last edited by starlightsparker (Aug. 29, 2024 00:11:57)
- blubby4
-
Scratcher
100+ posts
multi line say blocks
You can do this already! Just put your cursor to the right of this bracket: [
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
- starlightsparker
-
Scratcher
1000+ posts
multi line say blocks
You can do this already! Just put your cursor to the right of this bracket: [And for mobile?
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
- blubby4
-
Scratcher
100+ posts
multi line say blocks
IDK, maybe backpack it? does mobile have a backpack?You can do this already! Just put your cursor to the right of this bracket: [And for mobile?
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
- bsteichman
-
Scratcher
500+ posts
multi line say blocks
You can do this already! Just put your cursor to the right of this bracket: [i copied it, doesn't work.
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
- bsteichman
-
Scratcher
500+ posts
multi line say blocks
“to be honest you don't even have to code the enter operator block, just have it do a new line when the string put into the say block has “⏎””I feel that’s too much work just for another line - not for ST, for users.say (join (join [Hello] (⏎ :: operators) ) [There!])
Can’t it just be that you can type the return key
like
this
And then it shows up as another another line, and if you don’t use the return key it’s one line?
mb if it wasn't clear enough
Last edited by bsteichman (Aug. 29, 2024 02:41:56)
- A-MARIO-PLAYER
-
Scratcher
1000+ posts
multi line say blocks
We could just allow newlines in strings, like this:
Yeah i cant recreate this in Scratchblocks.
say [multi
line]
Yeah i cant recreate this in Scratchblocks.
Last edited by A-MARIO-PLAYER (Aug. 29, 2024 12:27:17)
- medians
-
Scratcher
1000+ posts
multi line say blocks
Why can't mobile copy and paste a character?You can do this already! Just put your cursor to the right of this bracket: [And for mobile?
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
- starlightsparker
-
Scratcher
1000+ posts
multi line say blocks
Maybe I’m not understanding- Which character?Why can't mobile copy and paste a character?You can do this already! Just put your cursor to the right of this bracket: [And for mobile?
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
- EmmettVA
-
Scratcher
5 posts
multi line say blocks
I don't care what other people say, this is a good idea.
- blubby4
-
Scratcher
100+ posts
multi line say blocks
Maybe it didn't work in the forums, but if you search for line feed character copy paste, you should be able to copy it.Maybe I’m not understanding- Which character?Why can't mobile copy and paste a character?You can do this already! Just put your cursor to the right of this bracket: [And for mobile?
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
- 8to16
-
Scratcher
1000+ posts
multi line say blocks
You can do this with hacked blocks
here's an example:https://scratch.mit.edu/projects/1076436111/
here's an example:https://scratch.mit.edu/projects/1076436111/
- ThisIsTemp1
-
Scratcher
1000+ posts
multi line say blocks
It should instead be determined by this:
With an escape function using brackets.
say [Hello/There!]
With an escape function using brackets.
Last edited by ThisIsTemp1 (Oct. 3, 2024 16:44:16)
- mysinginmonsters
-
Scratcher
100+ posts
multi line say blocks
It should instead be determined by this:The escape sequence needs something following it. But this isn't a good idea since it could cause new programmers to get confused on why they can't type a backslash.say [Hello/There!]
With an escape function using brackets.
You can do this already! Just put your cursor to the right of this bracket: [This didn't work for me.
], then press shift+right arrow, then copy. now you can paste it into the string, or into a variable, and it will work with the say block.
You can do this with hacked blocksThis works.
here's an example:https://scratch.mit.edu/projects/1076436111/
Last edited by mysinginmonsters (Oct. 3, 2024 19:27:41)
- starlightsparker
-
Scratcher
1000+ posts
multi line say blocks
[The best and easiest solution that solves most of the issues including yours, is to simply support using the return key.
The escape sequence needs something following it. But this isn't a good idea since it could cause new programmers to get confused on why they can't type a backslash.
- medians
-
Scratcher
1000+ posts
multi line say blocks
No, that may interfere with certain functionality, it should just be a newline block like in some mods:[The best and easiest solution that solves most of the issues including yours, is to simply support using the return key.
The escape sequence needs something following it. But this isn't a good idea since it could cause new programmers to get confused on why they can't type a backslash.
newline::operators reporterOr just a block that says \n.
return/enter::operators reporter
Last edited by medians (Oct. 3, 2024 20:07:33)
- 50_scratch_tabs
-
Scratcher
1000+ posts
multi line say blocks
I support, however I think the best way would be like shift+enter in string inputs. This would be helpful though.
- mysinginmonsters
-
Scratcher
100+ posts
multi line say blocks
No, that may interfere with certain functionality, it should just be a newline block like in some mods:That would definitely confuse new scratchers. When you click it or set a variable to it, it would just show empty. There will be tons of kids wondering what this mysterious block does and how to use it.newline::operators reporterOr just a block that says \n.
return/enter::operators reporter
And I don't agree with pressing enter either because I always press enter to confirm instead of clicking off.
It's best to just stick with the hacked blocks if you really want newline.
Last edited by mysinginmonsters (Oct. 3, 2024 23:07:26)
- Scratch137
-
Scratcher
1000+ posts
multi line say blocks
(#19)How about Shift+Enter? It's used by lots of messaging sites precisely because the Enter key is taken.No, that may interfere with certain functionality, it should just be a newline block like in some mods:That would definitely confuse new scratchers. When you click it or set a variable to it, it would just show empty. There will be tons of kids wondering what this mysterious block does and how to use it.newline::operators reporterOr just a block that says \n.
return/enter::operators reporter
And I don't agree with pressing enter either because I always press enter to confirm instead of clicking off.
It's best to just stick with the hacked blocks if you really want newline.










