Preprocessor Defines
From ROBOTC API Guide
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | + | <yambe:breadcrumb self="Preprocessor Defines">General|General Programming</yambe:breadcrumb> | |
| − | | | + | <br /> |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0" | {| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| Line 14: | Line 6: | ||
|The ROBOTC Compiler supports several different preprocessor defines that contain information about the compile time environment. Recently added are defines that indicate which features are enabled in the IDE. | |The ROBOTC Compiler supports several different preprocessor defines that contain information about the compile time environment. Recently added are defines that indicate which features are enabled in the IDE. | ||
| − | The predefined symbols can be used in include files | + | The predefined symbols can be used in include files and user programs for conditionally compiling code based on features. The preprocessor defines include: |
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:center; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000;" cellpadding="5%" | {| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:center; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000;" cellpadding="5%" | ||
| − | ! style="text-align: | + | ! style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|''Symbol Name'' |
! style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|Usage / Comments | ! style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|Usage / Comments | ||
|- | |- | ||
| Line 26: | Line 18: | ||
|- | |- | ||
| style="font-family: Courier New, Courier, monospace; text-align:left; color:#8b0000; border-style: solid; border-width: 0px 0px 0px 0px"|_TARGET | | style="font-family: Courier New, Courier, monospace; text-align:left; color:#8b0000; border-style: solid; border-width: 0px 0px 0px 0px"|_TARGET | ||
| − | | style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|Contains the type of debugger target | + | | style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|Contains the type of debugger target (select either “Robot”, “Emulator” or “VirtWorld”). |
| − | + | ||
|- | |- | ||
| style="font-family: Courier New, Courier, monospace; text-align:left; color:#8b0000; border-style: solid; border-width: 0px 0px 0px 0px"|NXT, TETRIX, VEX, VEX20, ARDUINO | | style="font-family: Courier New, Courier, monospace; text-align:left; color:#8b0000; border-style: solid; border-width: 0px 0px 0px 0px"|NXT, TETRIX, VEX, VEX20, ARDUINO | ||
| Line 55: | Line 46: | ||
ROBOTC also supports the standard C preprocessor symbols below: | ROBOTC also supports the standard C preprocessor symbols below: | ||
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:center; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000;" cellpadding="5%" | {| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:center; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000;" cellpadding="5%" | ||
| − | ! style="text-align: | + | ! style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|''Symbol Name'' |
! style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|Usage / Comments | ! style="text-align:left; border-style: solid; border-width: 0px 0px 0px 0px"|Usage / Comments | ||
|- | |- | ||
Latest revision as of 07:48, 20 June 2012
General Programming → Preprocessor Defines
| The ROBOTC Compiler supports several different preprocessor defines that contain information about the compile time environment. Recently added are defines that indicate which features are enabled in the IDE.
The predefined symbols can be used in include files and user programs for conditionally compiling code based on features. The preprocessor defines include:
|