<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.robotc.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.robotc.net/w/index.php?title=Using_Structs&amp;feed=atom&amp;action=history</id>
		<title>Using Structs - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.robotc.net/w/index.php?title=Using_Structs&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://www.robotc.net/w/index.php?title=Using_Structs&amp;action=history"/>
		<updated>2013-05-21T09:53:58Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://www.robotc.net/w/index.php?title=Using_Structs&amp;diff=3450&amp;oldid=prev</id>
		<title>Bfeher: Created page with &quot;{{DISPLAYTITLE: Using Structs}} &lt;yambe:breadcrumb self=&quot;Using Structs&quot;&gt;Programming_Tips_Tricks|Programming Tips Tricks&lt;/yambe:breadcrumb&gt; &lt;br /&gt;  Structs are variables made of...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.robotc.net/w/index.php?title=Using_Structs&amp;diff=3450&amp;oldid=prev"/>
				<updated>2012-05-15T20:27:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{DISPLAYTITLE: Using Structs}} &amp;lt;yambe:breadcrumb self=&amp;quot;Using Structs&amp;quot;&amp;gt;Programming_Tips_Tricks|Programming Tips Tricks&amp;lt;/yambe:breadcrumb&amp;gt; &amp;lt;br /&amp;gt;  Structs are variables made of...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE: Using Structs}}&lt;br /&gt;
&amp;lt;yambe:breadcrumb self=&amp;quot;Using Structs&amp;quot;&amp;gt;Programming_Tips_Tricks|Programming Tips Tricks&amp;lt;/yambe:breadcrumb&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Structs are variables made of a collection of other variables. Again, this is not unique to ROBOTC, but still useful in general, and not as widely known to beginning programmers. I'll demonstrate with an example:&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ROBOTC&amp;quot;&amp;gt;&lt;br /&gt;
typedef struct{&lt;br /&gt;
  int maxPos;&lt;br /&gt;
  int minPos;&lt;br /&gt;
  int armSpeed;&lt;br /&gt;
  int prevSensorValues[10];&lt;br /&gt;
} robotArm;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an example of a struct. If you have multiple arms on your robot, you can have a struct to hold the properties of each one.&lt;br /&gt;
&lt;br /&gt;
A struct is implemented, and its components are accessed like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ROBOTC&amp;quot;&amp;gt;&lt;br /&gt;
robotArm leftArm;&lt;br /&gt;
leftArm.maxPos = 2000;&lt;br /&gt;
leftArm.minPos = 150;&lt;br /&gt;
leftArm.armSpeed = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip-from-author|name=magicode|link=http://www.vexforum.com/showpost.php?p=220816&amp;amp;postcount=4}}&lt;/div&gt;</summary>
		<author><name>Bfeher</name></author>	</entry>

	</feed>