
88
"C" Programming Guide For Optimus S/R
type (required)
A letter that indicates the type of variable being printed
(see below).
Flags
Meaning
-
Left justify output value. The default is right justification.
+
If the output value is a numerical one, print a '+' or '-' character
according to the sign of the value. A '-' character is always printed
for a negative value no matter this flag is specified or not.
blank
Positive numerical values are prefixed with blank spaces. This flag
is ignored if the + flag also appears.
#
When used in printing variables of type o, x, or X (see below),
non-zero output values are prefixed with 0, 0x, or 0X respectively.
Type
Expected Input
c
d
i
o
u
x
X
s
Single character
Signed decimal integer
Signed decimal integer
Octal digits without sign
Unsigned decimal integer
Hexadecimal digits using lower case letter
Hexadecimal digits using upper case letter
A null terminated character string
Return
It returns the character count that sent to the LCD.
putchar
Purpose
To display a character on the LCD.
Syntax
int putchar (int c);
int c; /* character being sent to the LCD */
Example
putchar ('A');
Description
This routine sends a character specified in the argument
c
to the LCD at the
current cursor position. The cursor is moved accordingly.
Return
It always returns 1.
See Also
puts
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...