Difference between revisions of "TestSandbox"

From ROBOTC API Guide
Jump to: navigation, search
Line 42: Line 42:
 
|This area allows you to perform basic tasks (saving, copy & pasting, undo, etc.), switch between multiple open programs using the tabbed interface, and access all of ROBOTC's additional functionality through the various menus.<br />
 
|This area allows you to perform basic tasks (saving, copy & pasting, undo, etc.), switch between multiple open programs using the tabbed interface, and access all of ROBOTC's additional functionality through the various menus.<br />
 
[[File:ROBOTC-IDE_Templates.png]]
 
[[File:ROBOTC-IDE_Templates.png]]
 +
|}
 +
<br />
 +
 +
== Code Editor ==
 +
=== Writing Code ===
 +
{|width="740px"
 +
|-
 +
|Writing Code is the primary focus of ROBOTC, being a C-Based development environment. The ROBOTC Code Editor provides some visual assistance while programming with the use of line numbers and color coding:<br /><br />
 +
[[File:ROBOTC-2010.01.13-13.14.29.png]]<br />
 +
 +
Normal Text is displayed as <span class="codeBasic">black text</span>. Normal text is used for variable and function names that are user-defined and not recognized by the compiler as reserved words.
 +
 +
Comments are displayed as <span class="codeComments">green text</span> . Comment are any bits of text in a program prefaced with a "<span class="codeComments">//</span>" or a "<span class="codeBasic">/*</span>". This "commented text" is not considered code and is ignored when the compiler is generating byte-code to send to the robot controller.
 +
 +
Reserved Words/Pre-Defined Functions (int, motor) are displayed as <span class="keywordB">bold blue text</span> and <span class="keywordBI">italicized blue text</span>.
 +
 +
Constants and Parameters (127, port1) are displayed as <span class="codeStringsNums">red text</span>.
 +
 +
Syntax and Operands (+, -, *, {, <, [, etc.) are displayed as  <span class="codePunc">light red text</span>.
 
|}
 
|}
 
<br />
 
<br />

Revision as of 14:59, 14 May 2012

Tutorials → ROBOTC Interface




Overview

ROBOTC for Mindstorms is an Integrated Development Environment. It has been developed to provide as much support as possible for the platforms it is compatible with. The ROBOTC interface will modify itself to accommodate the functionality found in your controller. ROBOTC extends the ‘C’ programming language with a number of built-in variables and functions to provide control over a robot’s hardware devices, i.e. the motors and sensors.

ROBOTC IDE.png


There are three main sections to the ROBOTC IDE:

  1. The Editor
  2. The Code Templates / Function Library
  3. The Main Menu / Toolbar


Editor

This is the part of the interface where the user can write code.

ROBOTC-IDE Editor.png


Code Templates / Function Library

This portion of the interface allows user to see all the functions available in ROBOTC at their user level. Portions of code from the "Function Library" can be dragged into the Editor.

ROBOTC-IDE Toolbar.png


Main Menu / Toolbar

This area allows you to perform basic tasks (saving, copy & pasting, undo, etc.), switch between multiple open programs using the tabbed interface, and access all of ROBOTC's additional functionality through the various menus.

ROBOTC-IDE Templates.png


Code Editor

Writing Code

Writing Code is the primary focus of ROBOTC, being a C-Based development environment. The ROBOTC Code Editor provides some visual assistance while programming with the use of line numbers and color coding:

ROBOTC-2010.01.13-13.14.29.png

Normal Text is displayed as black text. Normal text is used for variable and function names that are user-defined and not recognized by the compiler as reserved words.

Comments are displayed as green text . Comment are any bits of text in a program prefaced with a "//" or a "/*". This "commented text" is not considered code and is ignored when the compiler is generating byte-code to send to the robot controller.

Reserved Words/Pre-Defined Functions (int, motor) are displayed as bold blue text and italicized blue text.

Constants and Parameters (127, port1) are displayed as red text.

Syntax and Operands (+, -, *, {, <, [, etc.) are displayed as light red text.