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

#1 2012-03-04 19:40:26

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Joining All Items Of List

Is there a way to make all the items of a list join together?


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

#2 2012-03-04 19:45:44

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Joining All Items Of List

use this

when gf clicked
add [join [item 1 of list]join[item 2 of list]] to list
Hope this helps!

Last edited by coolhogs (2012-03-04 19:48:29)


Get ready for domination of:  tongue

Offline

 

#3 2012-03-04 19:46:51

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Re: Joining All Items Of List

coolhogs wrote:

use this

when gf clicked
join [items 1 of list][join items 2 of list]

But it's more than two items, and the about of items will be frequently changing.


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

#4 2012-03-04 19:50:07

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Joining All Items Of List

WingsGames wrote:

coolhogs wrote:

use this

when gf clicked
join [items 1 of list][join items 2 of list]

But it's more than two items, and the about of items will be frequently changing.

well put more join blocks on them.


Get ready for domination of:  tongue

Offline

 

#5 2012-03-04 19:52:24

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Re: Joining All Items Of List

coolhogs wrote:

WingsGames wrote:

coolhogs wrote:

use this

when gf clicked
join [items 1 of list][join items 2 of list]

But it's more than two items, and the about of items will be frequently changing.

well put more join blocks on them.

But I don't know how many there will be. As I said, it'll be constantly changing. Also, there can't be any extra spaces.


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

#6 2012-03-04 19:55:28

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Joining All Items Of List

WingsGames wrote:

coolhogs wrote:

WingsGames wrote:


But it's more than two items, and the about of items will be frequently changing.

well put more join blocks on them.

But I don't know how many there will be. As I said, it'll be constantly changing. Also, there can't be any extra spaces.

there wont be any extra spaces. What do you mean by it constantly changing?


Get ready for domination of:  tongue

Offline

 

#7 2012-03-04 19:58:14

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Re: Joining All Items Of List

coolhogs wrote:

WingsGames wrote:

coolhogs wrote:


well put more join blocks on them.

But I don't know how many there will be. As I said, it'll be constantly changing. Also, there can't be any extra spaces.

there wont be any extra spaces. What do you mean by it constantly changing?

It's a list that keeps track of the letters in a word processor, so every time a character is added, it goes on the list.


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

#8 2012-03-04 20:26:54

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Joining All Items Of List

Just use the simple
(ListNameHere) block  wink


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#9 2012-03-04 20:36:56

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

Re: Joining All Items Of List

Pecola1 wrote:

Just use the simple
(ListNameHere) block  wink

^This. It leaves spaces in between the items, though.  If you don't want those, you can either use a counter variable and iterate through the list, or you can use the (list) block and parse out the spaces.   smile

Offline

 

#10 2012-03-04 20:45:36

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Joining All Items Of List

Greenatic wrote:

Pecola1 wrote:

Just use the simple
(ListNameHere) block  wink

^This. It leaves spaces in between the items, though.  If you don't want those, you can either use a counter variable and iterate through the list, or you can use the (list) block and parse out the spaces.   smile

btw, the spaces only appear if you have a space in one of the items  wink


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#11 2012-03-04 22:25:51

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Joining All Items Of List

set [i] to (0)
set [string] to ()
repeat(length of [list])
change [i] by (1)
set [string] to (join [string] [item (i) of [list]])
end

Last edited by MoreGamesNow (2012-03-05 16:33:35)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#12 2012-03-04 23:45:59

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Joining All Items Of List

You can just use the rounded list block...


http://trinary.tk/images/signature_.php

Offline

 

Board footer