11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Library Functionsomitted it defaults to 6. If the precision is zero, the decimal point will be omitted unless the alternateformat is specified.ePrint the corresponding argument in scientific notation. Otherwise similar to f.gUse e or f format, whichever gives maximum precision in minimum width. Any trailing zeros afterthe decimal point will be removed, and if no digits remain after the decimal point, it will also beremoved.o x X u dInteger conversion - in radices 8, 16, 16, 10 and 10 respectively. The conversion is signed in thecase of d, unsigned otherwise. The precision value is the total number of digits to print, and may beused to force leading zeroes. E.g. %8.4x will print at least 4 hex digits in an 8 wide field. Precedingthe key letter with an l indicates that the value argument is a long integer. The letter X prints outhexadecimal numbers using the upper case letters A-F rather than a-f as would be printed when usingx. When the alternate format is specified, a leading zero will be supplied for the octal format, and aleading 0x or 0X for the hex format.sPrint a string - the value argument is assumed to be a character pointer. At most n characters fromthe string will be printed, in a field m characters wide.cThe argument is assumed to be a single character and is printed literally.Any other characters used as conversion specifications will be printed. Thus % will produce asingle percent sign.The vprintf() function is similar to printf() but takes a variable argument list pointer rather thana list of arguments. See the description of va_start() for more information on variable argument lists.An example of using vprintf() is given below.Exampleprintf("Total = %4d%", 23)yields ’Total = 23%’printf("Size is %lx" , size)where size is a long, prints sizeas hexadecimal.printf("Name = %.8s", "a1234567890")yields ’Name = a1234567’177

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!