CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Something About #word

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cchappyboy



Joined: 03 Dec 2008
Posts: 45

View user's profile Send private message

Something About #word
PostPosted: Tue Jan 25, 2011 5:40 pm     Reply with quote

I use 33fj128MC804, I met a problem here.
Please see the code below.
Code:

struct rp
{
  int8 lowByte;
  int8 upperByte;
};
struct rp rp1;
#word rp1=0x06a4;
rp1.lowByte=0x17;//<----- This is line 17


but when i compile it, it always said
Error 48 "C:\PROJECT\ppin.c" Line 17(1,8): Expecting a (

Can anybody give me a help? Thanks
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Jan 26, 2011 12:37 am     Reply with quote

compiler directives like #word must be written without a semicolon delimiter
Code:
#word rp1=0x06a4
cchappyboy



Joined: 03 Dec 2008
Posts: 45

View user's profile Send private message

PostPosted: Wed Jan 26, 2011 9:58 am     Reply with quote

yes. you are right. but actually in my program file there isn't this ";" , it is a mistake when i post in here.
So the problem is still there. Please give me a help!
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Jan 26, 2011 10:10 am     Reply with quote

The code is working for me.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group