<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>LeafLabs Garden &#187; Topic: itoa  What Maple library is this function in?</title>
		<link>http://forums.leaflabs.com/topic.php?id=177</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:19:33 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=177" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1166</link>
			<pubDate>Fri, 10 Sep 2010 20:52:27 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">1166@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I did put the characters between back-ticks. It still removed formatting.&#60;br /&#62;
Even more frustrating is the the backslash characters are consumed, so if you edit a piece of text, backslashes disappear :-(
&#60;/p&#62;</description>
		</item>
		<item>
			<title>CarlO on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1165</link>
			<pubDate>Fri, 10 Sep 2010 20:28:57 +0000</pubDate>
			<dc:creator>CarlO</dc:creator>
			<guid isPermaLink="false">1165@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Try putting your code between back-tick (`) characters.  It will preserve formatting etc.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1164</link>
			<pubDate>Fri, 10 Sep 2010 20:06:25 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">1164@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;They need to go to a more professional board/forum like the Arduino.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1163</link>
			<pubDate>Fri, 10 Sep 2010 19:47:58 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">1163@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hope this will fix it - for some reason my cut and paste did not work?&#60;br /&#62;
It did it again ... it is THIS website that is messing up my paste?????&#60;br /&#62;
It does not like the &#34;aspos fwd slash zero aspos and semicolon&#34; after the two *wastr=&#60;/p&#62;
&#60;p&#62;/* Ansi C &#34;itoa&#34; based on Kernighan &#38;amp; Ritchie's &#34;Ansi C&#34;: */&#60;/p&#62;
&#60;p&#62;void strreverse(char* begin, char* end) {&#60;br /&#62;
char aux;&#60;br /&#62;
while(end&#38;gt;begin)&#60;br /&#62;
aux=*end, *end--=*begin, *begin++=aux;&#60;br /&#62;
}&#60;br /&#62;
void itoa(int value, char* str, int base) {&#60;br /&#62;
static char num[] = &#34;0123456789abcdefghijklmnopqrstuvwxyz&#34;;&#60;br /&#62;
char* wstr=str;&#60;br /&#62;
int sign;&#60;/p&#62;
&#60;p&#62;// Validate base&#60;br /&#62;
if (base&#38;lt;2 &#124;&#124; base&#38;gt;35)&#60;br /&#62;
{ *wstr='''; //&#38;lt;----------------&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#60;br /&#62;
return; }&#60;/p&#62;
&#60;p&#62;// Take care of sign&#60;br /&#62;
if ((sign=value) &#38;lt; 0) value = -value;&#60;/p&#62;
&#60;p&#62;// Conversion. Number is reversed.&#60;br /&#62;
do *wstr++ = num[value%base]; while(value/=base);&#60;br /&#62;
if(sign&#38;lt;0) *wstr++='-';&#60;br /&#62;
*wstr=''; //&#38;lt;--------------------------&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#38;lt;&#60;/p&#62;
&#60;p&#62;// Reverse string&#60;br /&#62;
strreverse(str,wstr-1);&#60;br /&#62;
} &#60;/p&#62;
&#60;p&#62;void setup() {&#60;/p&#62;
&#60;p&#62;}&#60;/p&#62;
&#60;p&#62;void loop() {&#60;/p&#62;
&#60;p&#62;}
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1162</link>
			<pubDate>Fri, 10 Sep 2010 19:21:00 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">1162@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Maybe the formatting of the post formatter, eat some characters, '' is not a valid character.&#60;br /&#62;
I assume it should have been, &#60;code&#62;&#38;#39;\&#38;#39;&#60;/code&#62;, that is the four characters &#60;code&#62;&#38;#39;&#60;/code&#62;, &#60;code&#62;\\&#60;/code&#62; , &#60;code&#62;0&#60;/code&#62; and &#60;code&#62;&#38;#39;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62; LeafLabs: I tried to get this right, using backquotes, and I couldn't.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1161</link>
			<pubDate>Fri, 10 Sep 2010 14:13:53 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">1161@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks ... for those who would also need this function itoa &#34;integer to ASCII&#34;&#60;br /&#62;
to eaisly write to a LCD here it is...&#60;/p&#62;
&#60;p&#62;/* Ansi C &#34;itoa&#34; based on Kernighan &#38;amp; Ritchie's &#34;Ansi C&#34;:&#60;br /&#62;
	 */&#60;br /&#62;
	void strreverse(char* begin, char* end) {&#60;br /&#62;
		char aux;&#60;br /&#62;
		while(end&#38;gt;begin)&#60;br /&#62;
			aux=*end, *end--=*begin, *begin++=aux;&#60;br /&#62;
	}&#60;br /&#62;
	void itoa(int value, char* str, int base) {&#60;br /&#62;
		static char num[] = &#34;0123456789abcdefghijklmnopqrstuvwxyz&#34;;&#60;br /&#62;
		char* wstr=str;&#60;br /&#62;
		int sign;&#60;/p&#62;
&#60;p&#62;		// Validate base&#60;br /&#62;
		if (base&#38;lt;2 &#124;&#124; base&#38;gt;35){ *wstr=''; return; }&#60;/p&#62;
&#60;p&#62;		// Take care of sign&#60;br /&#62;
		if ((sign=value) &#38;lt; 0) value = -value;&#60;/p&#62;
&#60;p&#62;		// Conversion. Number is reversed.&#60;br /&#62;
		do *wstr++ = num[value%base]; while(value/=base);&#60;br /&#62;
		if(sign&#38;lt;0) *wstr++='-';&#60;br /&#62;
		*wstr='';&#60;/p&#62;
&#60;p&#62;		// Reverse string&#60;br /&#62;
		strreverse(str,wstr-1);&#60;br /&#62;
	}
&#60;/p&#62;</description>
		</item>
		<item>
			<title>snigelen on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1159</link>
			<pubDate>Fri, 10 Sep 2010 10:08:49 +0000</pubDate>
			<dc:creator>snigelen</dc:creator>
			<guid isPermaLink="false">1159@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;It's a common function (some say, I've only seen it in avr-libc), but not standard. See for example &#60;a href=&#34;http://en.wikipedia.org/wiki/Itoa&#34;&#62;Wikipedia&#60;/a&#62; for a base 10 implementation, or you could use sprintf() (or not, it will eat a lot of flash space :-().
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "itoa  What Maple library is this function in?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=177#post-1157</link>
			<pubDate>Fri, 10 Sep 2010 08:28:17 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">1157@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;itoa &#38;lt;standard C lib. stdlib.h&#38;gt; What Maple library is this function itoa in?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
