Discuss Scratch

plasma26
Scratcher
62 posts

What is new line?

In some mods, I see a reporter called new line. What is that? What does it do?

Hardmath123
Scratcher
1000+ posts

What is new line?

plasma26 wrote:

In some mods, I see a reporter called new line. What is that? What does it do?
Suppose you want to use the say block with two lines being said. The new line reporter is a special character that tells Scratch to start a new line. You use it with JOIN to get multiline text. Neat, isn't it?
plasma26
Scratcher
62 posts

What is new line?

Oh. Thanks!

davidkt
Scratcher
1000+ posts

What is new line?

On Linux it's \n, on Mac \r, and on windows \r\n.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
nXIII
Scratcher
1000+ posts

What is new line?

davidkt wrote:

On Linux it's \n, on Mac \r, and on windows \r\n.
\n is the escape sequence used to represent a newline. \r is the escape sequence for a carriage return. What you described is how different platforms represent line breaks in files, not what a newline character is.

nXIII · GitHub
davidkt
Scratcher
1000+ posts

What is new line?

nXIII wrote:

davidkt wrote:

On Linux it's \n, on Mac \r, and on windows \r\n.
\n is the escape sequence used to represent a newline. \r is the escape sequence for a carriage return. What you described is how different platforms represent line breaks in files, not what a newline character is.
Right.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
DigiTechs
Scratcher
500+ posts

What is new line?

nXIII wrote:

davidkt wrote:

On Linux it's \n, on Mac \r, and on windows \r\n.
\n is the escape sequence used to represent a newline. \r is the escape sequence for a carriage return. What you described is how different platforms represent line breaks in files, not what a newline character is.
* the \ character in most programming/scripting languages represents an escape character, which can be suffixed with various characters, such as ‘n’ which creates a ‘newline’ (ASCII 13) character

Yeah. I like having it that way.


I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.
scratchisthebest
Scratcher
1000+ posts

What is new line?

There is a newline character, however programming languages would explode if you tried to type them in, so the escape sequences are used instead.

Including Scratch, which is why those mods have a newline reporter.

I am a Lava Expert
MabonBaladevaKain
Scratcher
100+ posts

What is new line?

For Carriage Return / New Line inside the Scratch editor hold the Alt key and on the numpad type 010 . At least for lists anyway.

I am working on a little text generator thing and the info you will find is misleading if you search for enter.
You have to search for linefeed or newline or something like that.
So I am sure someone will find this post useful even if it is a bit of a necropost.
TheNiftyArrow
Scratcher
13 posts

What is new line?

MabonBaladevaKain wrote:

For Carriage Return / New Line inside the Scratch editor hold the Alt key and on the numpad type 010 . At least for lists anyway.

I am working on a little text generator thing and the info you will find is misleading if you search for enter.
You have to search for linefeed or newline or something like that.
So I am sure someone will find this post useful even if it is a bit of a necropost.
How can I do this? I am trying to do that in a list, although it does not work

Powered by DjangoBB

Standard | Mobile