Skip to content

Preprocessor Checks

fpdotmonkey edited this page Sep 16, 2013 · 1 revision

To use this file, type the following in your program:

#include "preprocessor_checks.h"

What it does

This program checks that a few preprocessor defines (listed below) have indeed been defined.

ROBOTC
NXT
TETRIX
FTC

If ROBOTC isn't defined, it will give you an error saying that you aren't using RobotC. If NXT isn't defined, it will give a warning saying that your RobotC SDK isn't in NXT mode. If TETRIX isn't defined, then it will give you a warning saying that your compiler isn't in TETRIX mode. FTC mode not being defined will give a warning saying that FTC mode isn't turned on.

This is all useful because we've spent days not being able to compile our code simply because we didn't realize that the compiler wasn't in the correct mode, so this can save a lot of time.

Clone this wiki locally