Go to Post Dean Kamen is my Shaquille O'niel (or any other generic sports star). - Daniel Brim [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 05-02-2005, 12:33
incognito_NICK's Avatar
incognito_NICK incognito_NICK is offline
hidden in the corner
AKA: Nick Ferreira
#0179 (Children of the swamp (swampthing))
Team Role: Programmer
 
Join Date: Nov 2004
Rookie Year: 2002
Location: palm beach gardens
Posts: 15
incognito_NICK will become famous soon enough
Send a message via ICQ to incognito_NICK Send a message via AIM to incognito_NICK
Question error with adc.h

all of a sudden when i compile now i get this error:

C:\mcc18\h\adc.h:160:Error: syntax error

witch goes to this line in the code:

-> union ADCResult
{
int lr; // 2 bytes as a long
char br[2]; // 2 bytes as 2 chars
};

what should be done to correct this error?
  #2   Spotlight this post!  
Unread 05-02-2005, 13:08
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: error with adc.h

This seems correct...
You probably left something out earlier in the code.
Most likely the line of code that is immediately before it... but it depends on the error.
__________________
- from B B frank

  #3   Spotlight this post!  
Unread 05-02-2005, 23:27
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: error with adc.h

Quote:
Originally Posted by incognito_NICK
all of a sudden when i compile now i get this error:

C:mcc18hadc.h:160:Error: syntax error

witch goes to this line in the code:

-> union ADCResult
{
int lr; // 2 bytes as a long
char br[2]; // 2 bytes as 2 chars
};

what should be done to correct this error?
Which .c file is it compiling when you get this error?

I am guessing that it must be main.c, user_routines.c, or user_routines_fast.c. because:
  1. In adc.h, the line you indicated is the first line that is neither a comment line, a blank line nor a preprocessor directive.
  2. adc.h is #included first in only in ifi_aliases.h, which is in turn #included first in only these three .c files.
I predict that there is some unintelligible garbage somewhere before the #include "ifi_aliases.h" in whichever one of these files is producing the error message. I further predict that the garbage is right at the beginning of the file. (Probably the result of some unintended keystrokes made sometime when the file/project was first opened.)

Good luck!
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
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
adc.h missing pagemauck Programming 9 16-11-2004 06:56
Header Not Found (adc.h) NotQuiteFree Programming 2 23-01-2004 16:26


All times are GMT -5. The time now is 19:20.

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