numbering systems
Is there a VB function to allow you to construct counters using different number systems ie base 3, base 4, base 5, 6, 7 etc ?
I haven't used VB for a while and I'm getting a headache trying to think how to get started on this, I just need pointing in the right direction, then I will be able to manage
Thanks for any help
w00dy
Junior Poster in Training
70 posts since Jun 2005
Reputation Points: 11
Solved Threads: 2
What I want to do is take a string and find all possible combinations of the characters in the string.
I read somewhere of one method that converts the characters to a number, using the number of characters to define the base ie if there are 5 characters then use base 5. Then as the counter counts up, select only those numbers that have no repeated digits ie 03214 would be selected but not 03213, then convert each selected number back to the corresponding characters.
Seems kind of roundabout to me and would prefer a more efficient way.
Does this explanation suggest anything?
w00dy
Junior Poster in Training
70 posts since Jun 2005
Reputation Points: 11
Solved Threads: 2
What part do you not understand?
w00dy
Junior Poster in Training
70 posts since Jun 2005
Reputation Points: 11
Solved Threads: 2
as the counter counts up, select only those numbers that have no repeated digits ie 03214 would be selected but not 03213, then convert each selected number back to the corresponding characters.
I guess the idea of that is instead of using string functions to find the different combinations in a sorting routine. Say the original string is "chain", then c =0, h = 1, a = 2, i =3, n =4.
So 03214 = ciahn, a valid anagram.
But 03213 has two 3's so is not valid.
w00dy
Junior Poster in Training
70 posts since Jun 2005
Reputation Points: 11
Solved Threads: 2