This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-22 04:05:11

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

I need help!

I need help in squeak dividing strings. I have t1 = 'something' but I don't know how to add more strings.

* My 500 post!  smile


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#2 2011-08-22 04:37:14

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: I need help!

I don't get what you mean, "add more strings."

Offline

 

#3 2011-08-22 04:55:17

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: I need help!

Dividing strings!? Add more strings!? t1 = something!?

Offline

 

#4 2011-08-22 11:51:06

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: I need help!

I mean, I tried to put t1 = 'something', 'something else' ifTrue:, but it didn't work. I need a way to write t1 = string or string or string ifTrue:


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#5 2011-08-22 12:15:54

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: I need help!

I think this will work:

Code:

((t1 = 'string here') | (t1 = 'string here') | (t1 = 'string here)) ifTrue:[commands here].

I have a habit of putting in unnecessary parentheses just to be safe, so if when you save some of them go away, it's fine.

By the way, when you did t1 = 'something', 'something else', you joined the strings.  In other words, you were testing to see if t1 = 'somethingsomething else'.   tongue

Last edited by Greenatic (2011-08-22 12:17:36)

Offline

 

#6 2011-08-22 12:20:06

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: I need help!

Thank you!


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

Board footer