Difference between revisions of "TestSandbox"

From ROBOTC API Guide
Jump to: navigation, search
Line 16: Line 16:
 
   | style="text-align:left; border-style: solid; border-width: 1px 0px 1px 0px"|A Boolean value; either <span class="keywordBI">true</span> or <span class="keywordBI">false</span>.
 
   | style="text-align:left; border-style: solid; border-width: 1px 0px 1px 0px"|A Boolean value; either <span class="keywordBI">true</span> or <span class="keywordBI">false</span>.
 
Note that <span class="keywordBI">false</span> is equivalent to zero (0), and <span class="keywordBI">true</span> is equivalent to any non-zero number (both positive and negative).
 
Note that <span class="keywordBI">false</span> is equivalent to zero (0), and <span class="keywordBI">true</span> is equivalent to any non-zero number (both positive and negative).
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-arduino328}}
+
   |style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-arduino328}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-arduinoMega}}
+
   |style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-arduinoMega}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-vex2}}
+
   |style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-vex2}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-nxt}}
+
   |style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-nxt}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-vex}}
+
   |style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-vex}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-tetrix}}
+
   |style="text-align:right; border-style: solid; border-width: 1px 0px 1px 0px"|{{tag-tetrix}}
 
   |-
 
   |-
 
   | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_byte">byte</span>
 
   | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_byte">byte</span>
 
   | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A whole number ranging from -128 to 127.
 
   | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A whole number ranging from -128 to 127.
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
+
   |style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
   |style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
   |style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
   |style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
+
   |style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
   | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
   |style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_char">char</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A whole number ranging from -128 to 127.  Can be interpreted as a character value.
+
For example, <span class="codeStringsNums">42</span> = '<span class="codeStringsNums">B</span>' and vice versa.
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_float">float</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A floating-point number (decimal) with the following length and accuracy restrictions:<br />
+
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#F2F2F2; text-align:left; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 0px; border-style: solid; border-color: #000;" cellpadding="5%"
+
    ! style="border-style: solid; border-width: 0px 0px 0px 0px"|
+
    !
+
    |-
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.####
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.0000 to +2,048.0000
+
    |-
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.###
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.000 to +32,768.000
+
    |-
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.##
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.00 to +262,144.00
+
    |-
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.#
+
    | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.0 to +2,097,200.0
+
    |-
+
    |}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_long">long</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A whole number ranging from -2,147,483,648 to 2,147,483,647.
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_int">int</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A whole number ranging from -32,768 to 32,767.
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_short">short</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A whole number ranging from -32,768 to 32,767.
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_string">string</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A sequence of characters.
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordBI" id="dataType_word">word</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|A whole number ranging from -32,768 to 32,767.
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|<span class="keywordB" id="dataType_ubyte">ubyte</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 1px 0px"|An unsigned byte (0 to 255).
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduino328}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-vex}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 1px 0px"|{{tag-tetrix}}
+
  |-
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|<span class="keywordBI" id="dataType_void">void</span>
+
  | style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|This means that the function doesn't return anything.
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 0px 0px"|{{tag-arduino328}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 0px 0px"|{{tag-arduinoMega}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 0px 0px"|{{tag-vex2}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 0px 0px"|{{tag-nxt}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 0px 0px"|{{tag-vex}}
+
  | min-width="50px" style="text-align:right; border-style: solid; border-width: 0px 0px 0px 0px"|{{tag-tetrix}}
+
  |-
+
  |}
+
 
|}
 
|}
 
<br />
 
<br />

Revision as of 17:20, 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] [cortex] [nxt] [pic] [tetrix]