Difference between revisions of "TestSandbox"

From ROBOTC API Guide
Jump to: navigation, search
Line 6: Line 6:
 
   ! style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|''data type''
 
   ! style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|''data type''
 
   ! style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|Comments
 
   ! style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|Comments
   ! width="130px" style="background-color: green; text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
+
   ! width="130px" style="green; text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
   ! width="130px" style="background-color: green; text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
   ! width="130px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
   ! width="130px" style="background-color: green; text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
   ! width="130px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
   ! width="130px" style="background-color: green; text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
   ! width="130px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
   ! width="130px" style="background-color: green; text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
+
   ! width="130px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
   ! width="130px" style="background-color: green; text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
   ! width="130px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
 
   |-
 
   |-
 
   | style="text-align:left; border-style: solid; border-width: 1px 0px 1px 0px"|<span class="keywordBI" id="dataType_bool">bool</span>
 
   | style="text-align:left; border-style: solid; border-width: 1px 0px 1px 0px"|<span class="keywordBI" id="dataType_bool">bool</span>

Revision as of 15:28, 10 May 2012

Standard C data types:

data type Comments [arduino 328] [arduino Mega] [cortex] [nxt] [pic] [tetrix]
bool A Boolean value; either true or false.

Note that false is equivalent to zero (0), and true is equivalent to any non-zero number (both positive and negative).

[arduino 328] [arduino Mega] [cortex] [nxt] [pic] [tetrix]
byte A whole number ranging from -128 to 127. [arduino 328] [arduino Mega] [nxt] [tetrix] [cortex] [pic]
char A whole number ranging from -128 to 127. Can be interpreted as a character value.

For example, 42 = 'B' and vice versa.

[arduino 328] [arduino Mega] [nxt] [tetrix] [cortex] [pic]
float A floating-point number (decimal) with the following length and accuracy restrictions:
0.#### 0.0000 to +2,048.0000
0.### 0.000 to +32,768.000
0.## 0.00 to +262,144.00
0.# 0.0 to +2,097,200.0
[arduino Mega] [nxt] [tetrix] [cortex]
long A whole number ranging from -2,147,483,648 to 2,147,483,647. [arduino Mega] [nxt] [tetrix] [cortex]
int A whole number ranging from -32,768 to 32,767. [arduino 328] [arduino Mega] [nxt] [tetrix] [cortex] [pic]
short A whole number ranging from -32,768 to 32,767. [arduino 328] [arduino Mega] [nxt] [tetrix] [cortex] [pic]
string A sequence of characters. [arduino Mega] [nxt] [tetrix] [cortex]
word A whole number ranging from -32,768 to 32,767. [arduino 328] [arduino Mega] [nxt] [tetrix] [cortex] [pic]
ubyte An unsigned byte (0 to 255). [arduino 328] [arduino Mega] [nxt] [tetrix] [cortex] [pic]
void This means that the function doesn't return anything. [arduino 328] [arduino Mega] [nxt] [tetrix] [cortex] [pic]