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

printf int32

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



Joined: 17 Dec 2008
Posts: 2

View user's profile Send private message

printf int32
PostPosted: Wed Jan 14, 2009 11:06 am     Reply with quote

Is there a way in C to print an int32?
Ttelmah
Guest







PostPosted: Wed Jan 14, 2009 3:55 pm     Reply with quote

printf("%ld",val);

The 'l' tells printf, this is a 'long' value (int16 or int32). the function is effectively 'overloaded', and automatically detects whether it has to handle an int16 or int32 value.
The same 'l', can be used with the other integer printf formats (u,x etc.).

Best Wishes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jan 14, 2009 3:56 pm     Reply with quote

Use the forum's search engine to search for:
Quote:
printf int32

Then you will find previous threads like this:
http://www.ccsinfo.com/forum/viewtopic.php?t=30190

Download the CCS manual and look at the section on printf, on page 215
in the Acrobat reader. It lists all the format strings that are used to
print out the various data types:
http://www.ccsinfo.com/downloads/ccs_c_manual.pdf
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