views:

137

answers:

2
+2  Q: 

new line in squeak

i want to do something like this: Transcript show: '\n'. how?

+3  A: 

Use the following:

Transcript cr

You can use it after a value via a cascade:

Transcript show: 123; cr
anon
+1  A: 

The character itself can be reached as "Character cr". So, you could also do this:

Transcript show: 'Bla! , Character cr asString.

But of course,

Transcript show: 'Bla!' ; cr.

is way more elegant.

nes1983