On Tue, 8 Mar 2005 04:33:03 -0500, Rich Tretola <[EMAIL PROTECTED]> wrote:
> I know that I can use a loop, I was just wondering why the default
> behavior in actionscript is to automatically assume that testString is
> hex and that testNumber evaluates to 64 in the sample below:
[snip]
It actually assumes octal, not hex, and this is based on an old
implementation of C's atoi function AFAIK.
You can simply use parseInt("0100", 10) to get the desired result
instead of writing your own function to strip off 0's, etc. The
second arg is the radix. (base 10).
Manish