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

How to reduce size pf code please help

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







How to reduce size pf code please help
PostPosted: Tue Aug 24, 2004 11:54 am     Reply with quote

Dear All,
I'm using in my project a lot of fprintf, however it produce a lot of code making available memory resource to small for my main program. Do you have any other simple idea how to use fprintf but with a smaller size?
It seems that each fprintf is using a huge overhead.
Many thanks for your help
John
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Tue Aug 24, 2004 12:08 pm     Reply with quote

If you have multiple fprintf() statements throughout your code it will definately take up a boat load of space. You might want to see if you can make a function that will take care of the fprintf() stuff for you and just pass variables to it. That way you will only have one, or a couple if you still need more than one routine, fprintf()'s.

Ronald
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Tue Aug 24, 2004 12:11 pm     Reply with quote

Avoid using printf as much as you can. Use puts() and putc() instead.
_________________
The search for better is endless. Instead simply find very good and get the job done.
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