Hello,

I have a problem where I need to make my static variable names unique  
by appending a unique key string to them.  The key is generated from  
the string representing a file path.  I found an algorithm that  
generates a unique single precision floating point number from the  
sequence of ASCII characters in the string.  My problem is that I want  
to generate an 8 character sequence of characters (A-P) that represent  
the eight 4 bit hex characters that make up a 32 bit floating point  
number.  Of course if it were an integer, I would just keep dividing  
by 16 to get the characters out, but a floating point number will only  
give me 6 characters that way.  It is late, so perhaps it is just  
brain fade, but if anyone has a clue, I would appreciate the hints.   
Perhaps 6 characters (23 bits) is "good enough".  I am only keying a  
hundred or so paths.  Perhaps I should just make the key four 6 bit  
characters?

Best regards,
Dennis

Reply via email to