# Thread: [VB6] Compare, and generate new

1. ## [VB6] Compare, and generate new

Hi

I would like to know how I should do the following :

I input 3 or more strings (eg "kf - 12", "kd - 13", "fd - 23"), and then I would like to generate another (eg "kk - 11").

I am using VB6

Thanks

Greets
Kosty

2. ## Re: [VB6] Compare, and generate new

You'll have to tell us the algorithm or formula that the generated one is created by.

3. ## Re: [VB6] Compare, and generate new

It is build on 2 parts

AAA - 333 | BBB - 444

For example, the above string is one 'input' string

I think, the First 2 (AAA - 333) must be compared with the second 2 (BBB - 444) and if those two match, AFTER a mathematic check
Eg, all in decimal, and if the first 2/3 = second 2/4

It is very hard to explain, but it is the formula I want the program to search

4. ## Re: [VB6] Compare, and generate new

If it's a formula, just post the formula. Explaining math in English sometimes just doesn't work

All you've said so far is that if the first 2 meet some formula when compared to the second 2, the fifth one is generated. That's no more information than you originally posted. We need to know exactly what "match" means in this case, what to do if there is a match and what to do if there is no match.

5. ## Re: [VB6] Compare, and generate new

You dont realy get it, I think

Think of it as a name and number

The first part is a name (AAA - 333 -> Joe), the Second part is a serial number (BBB - 444 -> 123). They match.

Now I want to know what the match is between AAA - 333 and Joe, BBB - 444 and 123
AAA - 333 - BBB - 444 is 1 WORKING code, like your windows' CD key

==

But as you said it is going to be really hard to find the matching formula, and thats my question, how to build a program that can do this

6. ## Re: [VB6] Compare, and generate new

I don't get it either, how does AAA - 333 match BBB - 444? If you were to test, CStr("AAA - 333")=CStr("BBB - 444"), the result would be False.

The only way I can see they match would be a pattern:
1. For each number: 444 compared to 333, there is a difference of 111 (numbers)
2. For each letter: BBB compared to AAA, there is a difference of 111 (letters)
So, as a pattern I can see that they could match. But that is an algorithm based on a pattern using one example. Is that the algorithm used? If not, you should supply the algorithm for comparison, otherwise, all of us will simply be guessing.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

Featured