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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Library FunctionsCPUTSSynopsis#include void cputs (const char * s)DescriptionThe cputs() function writes its argument string to the console, outputting carriage returns beforeeach newline in the string. It calls putch() repeatedly. On a hosted system cputs() differs from puts()in that it reads the console directly, rather than using file I/O. In an embedded system cputs() andputs() are equivalent.ExampleSee Also#include #include char buffer[80];voidmain (void){for(;;) {cgets(buffer);if(strcmp(buffer, "exit") == 0)break;cputs("Type ’exit’ to finish\n");}}cputs(), puts(), putch()138

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

Saved successfully!

Ooh no, something went wrong!