Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print a newline in smalltalk

Tags:

smalltalk

I want to print out a newline-character in a string or achieve a wordwrap in any way. The C-style escape sequence \n does not seem to work! How can I do this?

like image 833
adius Avatar asked Nov 22 '25 11:11

adius


1 Answers

You need to concatenate the string parts with String cr or Character cr.

Full example:

Transcript show: 'First line', String cr, 'Second line'.

This will print following into the Transcript window:

First line
Second line
like image 119
adius Avatar answered Nov 24 '25 05:11

adius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!