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

#1 2009-03-21 09:49:44

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Searching Lists

I am creating a VERY complex project with a lot of data stored in a list. I want to be able to have my program search the list. Is there any way to do this? Please post a PROJECT with it, don't use the not nice looking forum blocks.


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#2 2009-03-21 10:28:16

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

abeair wrote:

I am creating a VERY complex project with a lot of data stored in a list. I want to be able to have my program search the list. Is there any way to do this? Please post a PROJECT with it, don't use the not nice looking forum blocks.

Anyone?


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#3 2009-03-21 11:33:54

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Searching Lists

What is it searching for?


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#4 2009-03-21 11:42:15

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

A string. Maybe it will need to search numbers too.


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#5 2009-03-21 11:45:07

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Searching Lists

Just stop now, scratch doesn't have the string commands for something like that. Just wait for version 1.4. I have a very good feeling that they will add more string features.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2009-03-21 14:05:53

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

Re: Searching Lists

You can search for an exact match on a string now.  If the list is sorted, you can use a bisection search and it will find it pretty quickly.  Would you like a demo?


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

Offline

 

#7 2009-03-21 14:31:21

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

Paddle2See wrote:

You can search for an exact match on a string now.  If the list is sorted, you can use a bisection search and it will find it pretty quickly.  Would you like a demo?

OK! Thanks!


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#8 2009-03-21 15:14:44

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

I just got back from my county's science fair!


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#9 2009-03-21 15:18:12

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Searching Lists

Did ya win?


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#10 2009-03-21 15:23:42

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

bosox397 wrote:

Did ya win?

Idk until next week.


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#11 2009-03-21 19:53:40

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

Re: Searching Lists

abeair wrote:

Paddle2See wrote:

You can search for an exact match on a string now.  If the list is sorted, you can use a bisection search and it will find it pretty quickly.  Would you like a demo?

OK! Thanks!

Okay, here it is

http://scratch.mit.edu/projects/Paddle2SeeFixIt/462018

I decided to just use a simple sequential search (start at the beginning, look until you find it or run out of items) because...it was simpler!  I hope you find it helpful.


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

Offline

 

#12 2009-03-21 22:24:23

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

Paddle2See wrote:

abeair wrote:

Paddle2See wrote:

You can search for an exact match on a string now.  If the list is sorted, you can use a bisection search and it will find it pretty quickly.  Would you like a demo?

OK! Thanks!

Okay, here it is

http://scratch.mit.edu/projects/Paddle2SeeFixIt/462018

I decided to just use a simple sequential search (start at the beginning, look until you find it or run out of items) because...it was simpler!  I hope you find it helpful.

THANKS SO MUCH!!!!!


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#13 2009-03-21 22:27:33

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Searching Lists

Hmmm I didn't know the <(  <=>  )> block worked with checking strings.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#14 2009-03-21 23:11:35

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

archmage wrote:

Hmmm I didn't know the <(  <=>  )> block worked with checking strings.

Neither did I.


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#15 2009-03-22 10:45:24

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Searching Lists

abeair wrote:

archmage wrote:

Hmmm I didn't know the <(  <=>  )> block worked with checking strings.

Neither did I.

ditto


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#16 2009-03-22 12:45:05

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Searching Lists

bosox397 wrote:

abeair wrote:

archmage wrote:

Hmmm I didn't know the <(  <=>  )> block worked with checking strings.

Neither did I.

ditto

Lol.


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

Board footer