|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Conditional #define Statements
I'm rewriting the navigate.c class for our team, and I've come to an annoying problem.
I have two sensors, left and right, for each side of the robot. Depending on a switch, only one should be read. That means I can save on code, I think. With PBASIC, a simple if statement and alias command would set "sensor" to "left_sensor" or "right_sensor" but I have no idea how to do this in C, without going into pointers (which I don't remember). Is there any way I can make a conditional #define (or similar) statement? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Contradictory FIRST Statements | Gobiner | Rules/Strategy | 10 | 14-01-2003 16:12 |
| Calling all Lawyers... ...Define "all parts" | Joe Johnson | General Forum | 10 | 13-03-2002 15:12 |
| Logical statements or math formulas | Manoel | Programming | 1 | 16-02-2002 23:29 |