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

#1 2012-03-06 22:41:00

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

"length of[]"

There should be a way to specify if you mean the "length of [list]" or "length of [string]" block in the new block-posting system (which is awesome, by the way  big_smile  ).


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

Offline

 

#2 2012-03-06 22:43:24

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

Re: "length of[]"

I support


Get ready for domination of:  tongue

Offline

 

#3 2012-03-06 22:50:32

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: "length of[]"

You use

(length of (list))
or

(length of (item (5) of [name v]))
smile

EDIT: The (List) should be a list identifier  wink

Last edited by jji7skyline (2012-03-06 22:50:58)


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#4 2012-03-07 02:47:15

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: "length of[]"

You already can.


Why

Offline

 

#5 2012-03-07 16:22:58

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: "length of[]"

U can

Offline

 

#6 2012-03-07 17:24:24

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

Re: "length of[]"

@jji7skyline: that looks like you're asking for the length of the string of a variable called "list".  The "length of [list name]" block is orange, and that one is green (the length-of-string block)

@RedRocker227 and turkey3: how?


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

Offline

 

#7 2012-03-07 17:27:53

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: "length of[]"

(length of [List v])
Or is that not what you mean?


Why

Offline

 

#8 2012-03-07 17:56:14

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

Re: "length of[]"

RedRocker227 wrote:

(length of [List v])
Or is that not what you mean?

Ah, that helped.  I didn't know about the "v" thing.  Thank you  smile

Testing:

if<(length of [list_name])=[5]>
end
if<(length of [list_name v])=[5]>
end


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

Offline

 

#9 2012-03-07 18:20:25

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: "length of[]"

Closed by request.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer