This content has been marked as final. Show 8 replies
Try BinaryEncode / BinaryDecode
I don't think that will work, as I am trying to go from decimal to hex. When I try to use your code it states that the value is not in binary (1 or 0) and therefore wont convert. Thank you for the suggestion though!!
Parameter 1 of function BinaryEncode, which is now "50699", must be a valid binary object.
Check cflib.org. Bound to be something there.
Dan Bracuk wrote:
> Check cflib.org. Bound to be something there.
Or the documentation. The function the OP is looking for is
formatBaseN(). This allows conversion from decimal to any other base.
And the corresponding inputBaseN() function which goes the other way.
> Is there a function built into CF that allows me to do this conversion? I
> can't seem to find one.
Did you look in the documentation?
I just found that in Ben Forda's book. That got it, thanks!!
> I just found that in Ben Forda's book. That got it, thanks!!
Glad you found it.
livedocs is a good resource for those who are patient: it's a *very* slow
site, especially given the simple pages it's delivering. But it's got
everything you need (the annotations on the pages are often more useful
that the "official" line, btw).
A good entry point to the most important parts of livedocs are these:
It cuts down quite a bit of the waiting. They;re also good lists to scan
to get a handle on what CF can do, at least at an executive summary level.