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

Passing a string to a function
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kevcon



Joined: 21 Feb 2007
Posts: 142
Location: Michigan, USA

View user's profile Send private message

PostPosted: Fri Jun 01, 2007 12:34 pm     Reply with quote

I got this from the CCS manual, it looks like they allow pointers to some built in functions but not user functions.

Quote:

Attempt to create a pointer to a constant

Constant tables are implemented as functions. Pointers cannot be created to functions. For example CHAR CONST MSG[9]={"HI THERE"}; is permitted, however you cannot use &MSG. You can only reference MSG with subscripts such as MSG[i] and in some function calls such as Printf and STRCPY.


So it looks like if you want to pass a pointer you have to use the roundabout way I described above.
slandry



Joined: 12 Mar 2007
Posts: 7
Location: New Hampshire

View user's profile Send private message

PostPosted: Fri Jun 01, 2007 2:41 pm     Reply with quote

Looks like that might be it. Sure would have made for some cleaner code if it was possible. Thanks for all your help. If I hear anything from CCS, I'll let you know.

Best Regards
_________________
- Steve
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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