|
-
October 16th, 2001, 09:03 PM
#1
Comparing Strings
Looking for help in writing a code that will compare two names and determine if they are equal,less than,or greater than the other.Alphabetically speaking.
-
October 16th, 2001, 09:43 PM
#2
Re: Comparing Strings
u can compare the 2 strings as
If String1 = String2 then
' ......
End if
I can't understand, what do u mean by "Alphabetically speaking"
If u mean the length of the string then u can get that by
Len(String1) function
If u give an example for the cases where Less Than & Greater Than Occur I may be able to help u.
Srinika
If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it 
-
October 16th, 2001, 10:19 PM
#3
Re: Comparing Strings
I think he wants to make a lexicographical comparison of the two strings.
It can be done like this ..
If String1 > String2 Then
If String1 < String2 Then
etc.
So, ("apple" < "peach") will return True, while
("banana" < "apple") will return False.
Regards,
The Beret.
-
October 16th, 2001, 10:25 PM
#4
Re: Comparing Strings
First time in my life I heard the word - lexicographical
Srinika
If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it 
-
October 16th, 2001, 10:46 PM
#5
Re: Comparing Strings
This application will help file records alphabetically.You enter two names in txtName1 and txtName2.I have a command button named cmdCompare.I need corresponding code to determine if the two names are equal to each other.Example John Doe = John Doe or one name is less than the other.Example Al Alda is less than Zack Zeller. or one name is greater than the other.The answer will display true or false in txtName1=Name2,txtName1<Name2 or txtName1>Name2.Using the last name starting with A as the least value. Thanks
-
October 17th, 2001, 12:49 AM
#6
Re: Comparing Strings
The word Lexicon means Dictionary and since in a dictionary all the words appear in their alphabetical order , lexicographical means alphabetical.
P.S : There's always a first time for everything!
Regards,
The Beret.
-
October 17th, 2001, 08:39 AM
#7
Re: Comparing Strings
Webster defines "Lexicographical Work" as a dictionary.
John G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|