so....
<cfscript>
/**
* Converts from decimal(base10) to hexadecimal (base16).
*
* @param str Decimal number to convert to hexadecimal.
* @return Returns a string.
* @author Rob Brooks-Bilson ([EMAIL PROTECTED])
* @version 1, November 6, 2001
*/
function DecToHex(str){
return Ucase(FormatBaseN(str, 16));
}
</cfscript>
<cfset newHex = decToHex(#myDecimalFormatNumber#)>
where...#myDecimalFormatNumber# is any decimal number.
:) tony
-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 10:54 PM
To: CF-Talk
Subject: RE: Convert number to Hex numbers??
from cflib.org decToHEx()
<cfscript>
/**
* Converts from decimal(base10) to hexadecimal (base16).
*
* @param str Decimal number to convert to hexadecimal.
* @return Returns a string.
* @author Rob Brooks-Bilson ([EMAIL PROTECTED])
* @version 1, November 6, 2001
*/
function DecToHex(str){
return Ucase(FormatBaseN(str, 16));
}
</cfscript>
hth
tony
-----Original Message-----
From: Troy Montour [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 10:29 PM
To: CF-Talk
Subject: Convert number to Hex numbers??
Hello,
trying to generate a registry file for something so I don't have to
type
all the information.
I need to convert a number to the hex value.
example 2 = 000002 or something like that.
anyone made something to do this or know how to point me in the right
direction would be great?
Thank you
Troy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4