PureBytes Links
Trading Reference Links
|
I do not understand the problem. If you only need 100 variables why 8
characters?
A-P is 16 letters.
There are 16X16=256 2 letter combinations, that's more than you need,
if you want no repeated letters, 16X15=240 still more than you need.
Why use more than 2 letters?
3 letters 16X16X16=4096 combinations, 16X15X14=3360 no repeats.
8 characters is has combinations in the trillions.
Overkill?
Bill
--- In amibroker@xxxxxxxxxxxxxxx, Dennis Brown <see3d@xxx> wrote:
>
> 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
>
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|