<?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: Variable - Data Type - &#34;word&#34; does not compile</title>
		<link>http://forums.leaflabs.com/topic.php?id=81</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:12:42 +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=81" rel="self" type="application/rss+xml" />

		<item>
			<title>poslathian on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81&amp;page=2#post-1620</link>
			<pubDate>Tue, 05 Oct 2010 10:53:52 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1620@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;copy: &#34;hmmm....thats embarrassing. Lets try this again... &#34;&#60;/p&#62;
&#60;p&#62;;)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-1618</link>
			<pubDate>Tue, 05 Oct 2010 10:51:39 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">1618@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;There was no ticket made ... I reviewed Redmine thoroughly before it went down.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-1611</link>
			<pubDate>Tue, 05 Oct 2010 09:07:38 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1611@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;redmine is down for a bit, so I'll have to check up on that ticket later...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-1610</link>
			<pubDate>Tue, 05 Oct 2010 09:07:06 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1610@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hmmm....thats embarrassing. Lets try this again...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-1575</link>
			<pubDate>Mon, 04 Oct 2010 09:52:07 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">1575@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Quote: &#34;ahh....good catch. thanks! added to 0.0.7 tickets&#34;&#60;/p&#62;
&#60;p&#62;Reply: Missed it again ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-979</link>
			<pubDate>Fri, 03 Sep 2010 20:10:59 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">979@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Poslathian: Your code sample above did not work as expected?&#60;br /&#62;
The second code sample does work.&#60;br /&#62;
Thanks.&#60;/p&#62;
&#60;p&#62;Code sample1: &#38;lt;Poslathian&#38;gt;&#60;/p&#62;
&#60;p&#62;uint16 word(uint8 high_byte, uint8 low_byte) {&#60;br /&#62;
uint16 ret_val = low_byte;&#60;br /&#62;
ret_val += (high_byte &#38;lt;&#38;lt; 8);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;--------------------------------------------&#60;/p&#62;
&#60;p&#62;Code sample2: &#38;lt;Hacker&#38;gt;&#60;/p&#62;
&#60;p&#62;unsigned int word(byte high_byte, byte low_byte)&#60;br /&#62;
{&#60;br /&#62;
int i = 0;&#60;br /&#62;
i &#124;= high_byte  &#38;amp; 0xFF;&#60;br /&#62;
i &#38;lt;&#38;lt;= 8;&#60;br /&#62;
i &#124;= low_byte &#38;amp; 0xFF;&#60;br /&#62;
return i;&#60;br /&#62;
}&#60;br /&#62;
-------------------------------------------------&#60;br /&#62;
found it - oops - you left out the return ret_val; .
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-978</link>
			<pubDate>Fri, 03 Sep 2010 14:28:03 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">978@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ahh....good catch. thanks! added to 0.0.7 tickets&#60;br /&#62;
in the meantime, perhaps throw a:&#60;/p&#62;
&#60;p&#62;uint16 word(uint8 high, uint8 low) {&#60;br /&#62;
   uint16 ret_val = low;&#60;br /&#62;
   ret_val += (high &#38;lt;&#38;lt; 8);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;note that maple is a little endian machine, so the low bytes come first.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-977</link>
			<pubDate>Fri, 03 Sep 2010 13:45:55 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">977@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Again ... but it is NOT a &#34;data type&#34; but a conversion.&#60;/p&#62;
&#60;p&#62;Under Leaflabs Language Reference / Conversions --&#38;gt; word(); does not compile.&#60;/p&#62;
&#60;p&#62;It shows word(); as a language ref. conversion command but it does not compile on the Maple.&#60;/p&#62;
&#60;p&#62;I need to convert two bytes back into an unsigned int. (16 bit) and&#60;br /&#62;
this word(h,l) conversion shows up in many of my library conversions and fails to compile on the Maple.&#60;/p&#62;
&#60;p&#62;byte h; high byte (8 bit)&#60;br /&#62;
byte l; low byte  (8 bit)&#60;/p&#62;
&#60;p&#62;unsigned int x = word(h,l);
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-541</link>
			<pubDate>Tue, 13 Jul 2010 12:55:13 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">541@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks for helping uncover a lot of this nitty gritty arduino mal-compliance! I agree whole heartedly that job #1 is to make sure everything in our docs (linked to arduino or not) is true. Debates about what functionality should be is a separate issue. Keep the finds coming! Were hoping to get as much done as possible into the stable 0.1.0 release.&#60;/p&#62;
&#60;p&#62;Also, an enterprising user wrote in about doing an SDFAT port (the same library that arduino uses for its SD card shield). Were psyched about that. Of course, as more work gets done on the platform more of this stuff gets found.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-534</link>
			<pubDate>Sun, 11 Jul 2010 13:36:02 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">534@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;In the C++ language, which currently underpins the Arduino programming language, the Boolean data type is called 'bool'.&#60;br /&#62;
'bool' is a reserved keyword in C++, but not C, though the name 'bool', and 'true' 'false' are predefined in C in a header file called stdbool.h. The C type name for a Boolean is _Bool, which is a reserved keyword.&#60;/p&#62;
&#60;p&#62;I just did a quick check, and both 'bool' and 'boolean' work inside the Arduino IDE, though bool is not highlighted, and boolean is. ('boolean' is defined in the Arduino IDE's wiring.h).&#60;/p&#62;
&#60;p&#62;I'd prefer 'bool', as that is C++, and is available in C.&#60;br /&#62;
I sometimes write and compile code for the Arduino on my Mac, or Linux, so the more common it is, the easier for me.&#60;/p&#62;
&#60;p&#62;I've never used the Bxxxxxx stuff. I use 0x... or 0bxxxxx.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-530</link>
			<pubDate>Sat, 10 Jul 2010 16:01:34 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">530@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;FYI ... you should seriously re-visit about using the Arduino keyword &#34;word&#34;.&#60;br /&#62;
I tried to do a SD &#34;library conversion test&#34; over the weekend and this data keyword&#60;br /&#62;
poped up several times.&#60;br /&#62;
Note: I used the &#34;unsigned int&#34; in place of the data keyword &#34;word&#34;&#60;/p&#62;
&#60;p&#62;Other conversion faults were &#34;bool&#34; and &#34;boolean&#34; and Bxxxxx / 0bxxxxx.&#60;br /&#62;
Note: The Arduino standard is boolean but other &#34;C&#34; code uses bool for short? &#60;/p&#62;
&#60;p&#62;Ref. Link SD Library:&#60;br /&#62;
&#60;a href=&#34;http://www.seeedstudio.com/depot/sd-card-shield-for-arduino-v21-p-492.html?cPath=104_109&#34; rel=&#34;nofollow&#34;&#62;http://www.seeedstudio.com/depot/sd-card-shield-for-arduino-v21-p-492.html?cPath=104_109&#60;/a&#62;&#60;br /&#62;
Press link on library below resources:&#60;/p&#62;
&#60;p&#62;Note: On this SD card shield for Arduino V2.1 &#34;simple&#34; modifications will have to be&#60;br /&#62;
performed to make it work on the Maple. &#60;/p&#62;
&#60;p&#62;... Just trying to help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-444</link>
			<pubDate>Thu, 01 Jul 2010 19:54:09 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">444@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;All I was doing was testing all the functions that you linked to the Arduino website.&#60;br /&#62;
To me, it really doesn't matter. But, for the &#34;others&#34;, who would click on &#34;word&#34; link&#60;br /&#62;
and eventually find out that it doesn't work, you would be asked this same question over&#60;br /&#62;
and over. Also, I found, no color change on keywords sizeof(), pow()?&#60;/p&#62;
&#60;p&#62;FYI ... I made a very crude Maple diagnostic that tests most if not all the Arduino commands. It's a go/ no go test that cycles the blue LED if everything is OK. So far, I picked up the goto command example being wrong and keyword color, the &#34;word&#34; compile failure, and the color change on the keywords sizeof &#38;amp; pow.&#60;br /&#62;
Looking good Perry ... now if only I had a &#34;rock solid&#34; win XP driver(s)?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>perry on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-443</link>
			<pubDate>Thu, 01 Jul 2010 19:22:16 +0000</pubDate>
			<dc:creator>perry</dc:creator>
			<guid isPermaLink="false">443@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;As gbulmer explained, there's no standard on what a 'word' is, it's architecture dependent.&#60;/p&#62;
&#60;p&#62;On ARM processors, the native word size is 4-bytes long (32-bits), not 2 bytes (16-bits).&#60;/p&#62;
&#60;p&#62;If you want to explicitly use an unsigned 16-bit type, please use &#60;code&#62;uint16.&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;See libmaple/libmaple_types.h&#60;/p&#62;
&#60;p&#62;We'll update the docs
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-442</link>
			<pubDate>Thu, 01 Jul 2010 17:58:21 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">442@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm not disagreeing about recognising 'word', I am questioning the definition.&#60;/p&#62;
&#60;p&#62;In the 'olden days' a word was the 'natural' unit of data to operate on.&#60;br /&#62;
For a 16-bit machine, 16 bits, for a 32 bit machine, 32 bits (some RISC processors didn't support much else).&#60;br /&#62;
So are you expecting 'word' to be an unsigned int (32 bits) or 0 to 65535 (16 bits)?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leaflabsandy on "Variable - Data Type - &#34;word&#34; does not compile"</title>
			<link>http://forums.leaflabs.com/topic.php?id=81#post-434</link>
			<pubDate>Thu, 01 Jul 2010 12:33:01 +0000</pubDate>
			<dc:creator>leaflabsandy</dc:creator>
			<guid isPermaLink="false">434@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Also, no color change on keywords sizeof(), pow()
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
