<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Base Conversion Functions</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2009/01/25/base-conversion-functions/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2009/01/25/base-conversion-functions/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: PB</title>
		<link>https://www.barneyb.com/barneyblog/2009/01/25/base-conversion-functions/comment-page-1/#comment-272222</link>
		<dc:creator>PB</dc:creator>
		<pubDate>Mon, 22 Aug 2011 08:16:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=664#comment-272222</guid>
		<description>Not sure if anyone is still active in this forum...  

But I the logic in this code (great, clean code!) and converted it to plpgsql and ran some tests.  It works great except I ran into an error.  

When trying to convert &quot;10184397971067&quot; from base10 to base2 (DEC2BIN), I get the result of:
&quot;0010100001100111101011011000101111001111011&quot;
where I should have gotten:
&quot;10010100001100111101011011000101111001111011&quot; (the left-most &quot;1&quot; is missing).

I verified this with MySQL CONV function, which got the result of &quot;10010100001100111101011011000101111001111011&quot;.

Can someone verify this?</description>
		<content:encoded><![CDATA[<p>Not sure if anyone is still active in this forum&#8230;  </p>
<p>But I the logic in this code (great, clean code!) and converted it to plpgsql and ran some tests.  It works great except I ran into an error.  </p>
<p>When trying to convert "10184397971067&#8243; from base10 to base2 (DEC2BIN), I get the result of:<br />
"0010100001100111101011011000101111001111011&#8243;<br />
where I should have gotten:<br />
"10010100001100111101011011000101111001111011&#8243; (the left-most "1&#8243; is missing).</p>
<p>I verified this with MySQL CONV function, which got the result of "10010100001100111101011011000101111001111011&#8243;.</p>
<p>Can someone verify this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2009/01/25/base-conversion-functions/comment-page-1/#comment-170588</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Thu, 02 Apr 2009 03:23:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=664#comment-170588</guid>
		<description>Tolaneas,

Yeah, that&#039;s a viable solution, and hopefully one that will be irrelevant in CF9 since CFSCRIPT is supposed to have the full functionality of CFML tags.  I didn&#039;t want to clutter the example with an extra function though, so I opted for NaN.</description>
		<content:encoded><![CDATA[<p>Tolaneas,</p>
<p>Yeah, that's a viable solution, and hopefully one that will be irrelevant in CF9 since CFSCRIPT is supposed to have the full functionality of CFML tags.  I didn't want to clutter the example with an extra function though, so I opted for NaN.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tolaneas</title>
		<link>https://www.barneyb.com/barneyblog/2009/01/25/base-conversion-functions/comment-page-1/#comment-170553</link>
		<dc:creator>Tolaneas</dc:creator>
		<pubDate>Wed, 01 Apr 2009 23:09:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=664#comment-170553</guid>
		<description>If CFScript doesn&#039;t support a throw statement, you can always write a function in a CFC using CFML that takes arguments to pass to a CFThrow tag.

THEN you could call the CFC method in CFScript to throw yourself an error.</description>
		<content:encoded><![CDATA[<p>If CFScript doesn't support a throw statement, you can always write a function in a CFC using CFML that takes arguments to pass to a CFThrow tag.</p>
<p>THEN you could call the CFC method in CFScript to throw yourself an error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2009/01/25/base-conversion-functions/comment-page-1/#comment-158861</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Mon, 26 Jan 2009 17:58:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=664#comment-158861</guid>
		<description>Yeah, underscore and dash are certainly allowed.  The legal digits are up to the RFC monkeys, I just wanted an algorithm that was sound for N digits, where N was unbounded.

It was actually an fun experiment to write the functions.  I expected it to be a bit more cumbersome, but the base-general rules for number assembly are remarkably simple and clean.  The UDFs follow suit, as expected, aside from the one-indexing workarounds and the hackish error trapping.</description>
		<content:encoded><![CDATA[<p>Yeah, underscore and dash are certainly allowed.  The legal digits are up to the RFC monkeys, I just wanted an algorithm that was sound for N digits, where N was unbounded.</p>
<p>It was actually an fun experiment to write the functions.  I expected it to be a bit more cumbersome, but the base-general rules for number assembly are remarkably simple and clean.  The UDFs follow suit, as expected, aside from the one-indexing workarounds and the hackish error trapping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Farrar</title>
		<link>https://www.barneyb.com/barneyblog/2009/01/25/base-conversion-functions/comment-page-1/#comment-158827</link>
		<dc:creator>John Farrar</dc:creator>
		<pubDate>Mon, 26 Jan 2009 14:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=664#comment-158827</guid>
		<description>You could also add an underscore. Isn&#039;t that allowed in all URLs/file names? We have used this concept in a number of areas. Your script is cleaner than one we created years ago... thanks for sharing.</description>
		<content:encoded><![CDATA[<p>You could also add an underscore. Isn't that allowed in all URLs/file names? We have used this concept in a number of areas. Your script is cleaner than one we created years ago&#8230; thanks for sharing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
