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 CCS Technical Support

Error at this line when compiling..

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



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

Error at this line when compiling..
PostPosted: Mon Feb 28, 2005 2:32 am     Reply with quote

I cannot compile this initialization of function, why is that?

void n61_init(int (*func)(int cmd, unsigned char c));
glenjoy



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

PostPosted: Mon Feb 28, 2005 7:10 am     Reply with quote

I think even CCS persons cannot answer my question, another bug?
valemike
Guest







Re: Error at this line when compiling..
PostPosted: Mon Feb 28, 2005 8:12 am     Reply with quote

glenjoy wrote:
I cannot compile this initialization of function, why is that?

void n61_init(int (*func)(int cmd, unsigned char c));


Is this supposed to be a function that takes a pointer to a function that takes an integer and unsigned char argument, and returns void?

Whatever it is i think i just tried to babble, last i remember, CCS does not allow function pointers.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Mon Feb 28, 2005 8:35 am     Reply with quote

The CCS compiler is NOT a full ANSI compliant compiler. Among its non-ANSI portions is its support for pointers to functions. Depending on the version of compiler you have it may or may not support them at all. And the support it does have is somewhat limited. It does however create a pointer to function automatically in switch() statements under the right conditions making state machines very efficient.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
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