Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smalltalk - Inserting a TAB character (Visual Works)

I'm having some trouble inserting a tab between two strings.

stringOne := 'Name'.
stringTwo := 'Address'.

I've tried:

info := stringOne, String tab, stringTwo.

or

info := stringOne, Character tab asString, stringTwo.

But none of those two messages are understood. I'm using Visual Works.

like image 622
user69514 Avatar asked Dec 20 '25 08:12

user69514


1 Answers

Goog gave you a way of making a String that included a tab

String with: Tab

and by yourself you discovered that Tab wasn't understood in VisualWorks and should be replaced by

Character tab

so put those 2 things together in a workspace evaluate to check it gives a String containing a tab Character

String with: Character tab

then use that in your concatenation

info := stringOne, (String with: Character tab), stringTwo.

(If you're going to do a lot of concatenation then use a WriteStream not ,)

like image 128
igouy Avatar answered Dec 22 '25 22:12

igouy



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!