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

Variable arguments question

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



Joined: 17 Oct 2005
Posts: 0

View user's profile Send private message

Variable arguments question
PostPosted: Mon Oct 17, 2005 4:04 pm     Reply with quote

CCS C doesn't appear to support variable arguments, however it does have support for printf, fprintf, etc. which do use variable arguments. That makes me think there's something there in CCS C that I'm missing.

I would like to define a function that takes a variable number of args, like printf. Does anyone have any suggestions for working around this issue? Should I just rethink my logic and try to solve the problem another way without va_list, etc?

Thanks for any suggestions.

E.g.
myprintf(char *format, ...)
{
va_list args;
//do stuff
}
_________________
Rob Bruce
Senior Engineer
Current Electronics
www.currentlelectronics.com
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Mon Oct 17, 2005 5:52 pm     Reply with quote

No variable arguments. The printf is handled at compile time. Take a look in the code library at my scanf function for one method of using variable arguments.
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