I am trying to print a variable (long int) from a function to an LCD screen.
printf(lcd_putc "\n%dblah blah", variable)
Any suggestions on the correct syntax and why this doesn't work? BTW it will compile if I typecast this variable as a float- but still not print.
Sophi
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Tue Jun 14, 2005 5:33 pm
You have to use "%LD" for 16 or 32-bit signed integers in CCS.
For unsigned integers, use "%LU".
I have put those in upper case so the "L" can be clearly seen,
but most people normally use lower case.
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