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

#1 2011-07-20 20:51:28

Qaze
Scratcher
Registered: 2010-10-02
Posts: 56

List problems...

I was wondering how you delete a specific item in a list. For example, how are you going to delete "thing" in the list without using "delete (#) of list" because the thing could be any number in the list?


http://i.imgur.com/2i8VY.gif

Offline

 

#2 2011-07-20 20:56:56

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: List problems...

The simplest way is to scan through the list until you find the item you're looking for, then delete whatever position that item happens to be in. Here's an example:

http://i.imgur.com/PXA8f.gif


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-07-20 21:01:30

Qaze
Scratcher
Registered: 2010-10-02
Posts: 56

Re: List problems...

Thanks, it works.


http://i.imgur.com/2i8VY.gif

Offline

 

Board footer