Go to Post 1 alliance wins a given tournament but all teams teams have a chance to define, chart, and create their own success. - PayneTrain [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2006, 22:55
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: A few simple programming questions;

Quote:
and
is that a line of code or only a comment in your post?

Im almost certain there is no IF AND ELSE statement ?
  #2   Spotlight this post!  
Unread 15-02-2006, 00:13
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 KenWittlief
is that a line of code or only a comment in your post?

Im almost certain there is no IF AND ELSE statement ?
You are correct. A search shows that syntax was not used in his code.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #3   Spotlight this post!  
Unread 15-02-2006, 09:45
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: A few simple programming questions;

I see you have an unmatched bracket here that will give you the syntax error.
Code:
if(p3_sw_trig)
	 {
My main suggestion would be to change how you are commenting out lines and blocks of code.
Switch over to the // form rather than use the /* */ form.
Your blocks are ending in random places.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 15-02-2006 at 09:52.
  #4   Spotlight this post!  
Unread 15-02-2006, 10:50
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: A few simple programming questions;

Quote:
Originally Posted by Mark McLeod
I see you have an unmatched bracket here that will give you the syntax error.
Code:
if(p3_sw_trig)
	 {
My main suggestion would be to change how you are commenting out lines and blocks of code.
Switch over to the // form rather than use the /* */ form.
Your blocks are ending in random places.
You're absolutely right, Mark. The problem is that the code is poorly written. IE, the original code that they gave us. Whoever writes the code apparently hasn't come to the realization that C++ style comments (//like this) are available in C now. It used to be that /*this*/ was all there was. However, it's bad coding practice to write one liners like this:
Code:
complicatedMethod(); /*Some comment here*/
Because if you want to block comment that line and a bunch of other like it, you will not be able to easily because the */ at the end will also end yours! The easiest way I have found around this without bothering to change the code (i.e. change /**/ to //) is to use this:

Code:
#if 0
complicatedMethod1(); /*Some comment here*/
complicatedMethod2(); /*Some comment here*/
complicatedMethod3(); /*Some comment here*/
#endif
Alright, that's all for now folks. I think cruella wants to make a coat out of my posts.

Paul Dennis
  #5   Spotlight this post!  
Unread 15-02-2006, 11:49
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: A few simple programming questions;

Quote:
Originally Posted by KenWittlief
Im almost certain there is no IF AND ELSE statement ?
I agree, it should be no IF, AND, or BUT statements.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Closed Thread


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 02:12.

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