Go to Post a big part of FIRST is to educate everyone, even those "stupid freshmen" about science and technology. - Beth Sweet [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 14-02-2004, 13:28
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
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?
__________________
AIM --> Woloi
Email --> ian@woloschin.com
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 18:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi