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.
Offline
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?
Offline
What is it searching for?
Offline
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.
Offline
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?
Offline
Did ya win?
Offline
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.
Offline
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!!!!!
Offline
Hmmm I didn't know the <( <=> )> block worked with checking strings.
Offline
abeair wrote:
archmage wrote:
Hmmm I didn't know the <( <=> )> block worked with checking strings.
Neither did I.
ditto
Offline