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

#1 2012-03-04 12:19:22

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

Join Multiple Letters

Could you join letters 1-Last of an item of a list?

[set [half 1 of document] to]  (Join letter [1] of (item one of document)) up until (letter [length of (item 1 of document)])
In other words, set the variable "half 1 of document" to the result of joining the first letter of a term in a list to the last letter of the same term.

Where document is a list.


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

Offline

 

#2 2012-03-04 12:28:31

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Join Multiple Letters

Use this:

set [var v] to (item (1) of [document v])
You don't need any more blocks, to report a whole item, just use the item block instead of trying to use the letter of with the item block.

Last edited by rdococ (2012-03-04 12:28:46)

Offline

 

#3 2012-04-03 18:14:34

aryabtsev
Scratcher
Registered: 2012-02-05
Posts: 81

Re: Join Multiple Letters

Use:

join (letter (1) of (item (999 v) of [list v])) (letter (length of (item (999 v) of [list v])) of (item (999 v) of [list v]))
Where 999 is the desired item of the list.


http://i.imgur.com/NX7AO.jpg

Offline

 

Board footer