Go to Post But should we "discriminate" based on how long your team has been around? If you think about it, FIRST's goal is to inspire students, right? ...But students on rookie and second-year teams, if anything, are in greater need of being inspired. - LauraN [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
  #19   Spotlight this post!  
Unread 14-02-2006, 21:42
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: A few simple programming questions;

Quote:
Originally Posted by Oumonkey
if(p3_sw_trig == 1)
{
pwm09 = 0;
pwm10 = 0;
}
else (p3_sw_trig == 0);
{
pwm09 = 254;
pwm10 = 254;
}
The portion highlighted in red is a syntax error. There are two ways to correct the error. Since the value of the variable can only be 0 or 1 you can just delete the portion in red. Or you can change the syntax to:
Code:
if (p3_sw_trig == 1)
{
   pwm09 = 0;
   pwm10 = 0;
}
else if (p3_sw_trig == 0)
{
   pwm09 = 254;
   pwm10 = 254;   
}
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
 


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
How To Ask Questions the Smart Way Brandon Martus General Forum 8 27-03-2013 15:52
Programming laptops [527]phil Programming 24 22-08-2005 12:28
#1 The Journey of a FIRST Graduate: Questions Ken Leung General Forum 12 27-07-2005 18:24
Suggestion for Delphi Programming Posts Chris Hibner CD Forum Support 1 27-07-2005 10:02
Can You help us??? (programming questions) HuskieRobotics Programming 1 24-02-2004 21:19


All times are GMT -5. The time now is 01:55.

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