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

#1 2012-12-03 10:58:46

benjamin2
Scratcher
Registered: 2008-10-18
Posts: 1000+

How to find if (item 1) is earlier alphabetically than (item 2)?

Assume both items are words (I'm working with two-letter words, but I don't think length matters). I need a script that tells me which is later alphabetically. Could someone please show me how to do it?

I'd be happy with a script that just reports which is earlier alphabetically (I'll adapt it to the situation). How do I do it?


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

Offline

 

#2 2012-12-03 11:04:47

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: How to find if (item 1) is earlier alphabetically than (item 2)?

I kind of have bits in my head, but it would involve having a list of each item of the aplphabet, and using a counter variable to compare the letters.  hmm


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#3 2012-12-03 11:16:48

benjamin2
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: How to find if (item 1) is earlier alphabetically than (item 2)?

OK... I think I know how it would go from there. I'll use this idea. Thanks!

Requesting closure.


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

Offline

 

#4 2012-12-03 11:36:03

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: How to find if (item 1) is earlier alphabetically than (item 2)?

It's like one of those things you can do as you go along, but can't really explain it until you do it.  tongue


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#5 2012-12-03 12:24:49

benjamin2
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: How to find if (item 1) is earlier alphabetically than (item 2)?

tongue

Last edited by benjamin2 (2012-12-03 12:25:01)


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

Offline

 

#6 2012-12-03 14:15:30

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: How to find if (item 1) is earlier alphabetically than (item 2)?

Closed by request of the topic owner.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer