Microchip Technology SW006021-2 User Manual
MPLAB
®
XC8 C Compiler User’s Guide
DS52053B-page 336
2012 Microchip Technology Inc.
GETS
Synopsis
#include <stdio.h>
char * gets (char * s)
Description
The
gets()
function reads a line from standard input into the buffer at
s
, deleting the
newline (compare: fgets()). The buffer is null terminated. In an embedded system,
gets()
is equivalent to cgets(), and results in getche() being called repeatedly to
get characters. Editing (with backspace) is available.
Example
#include <stdio.h>
void
main (void)
{
char buf[80];
printf("Type a line: ");
if(gets(buf))
puts(buf);
}
See Also
fgets()
, freopen(), puts()
Return Value
It returns its argument, or NULL on end-of-file.
GET_CAL_DATA
Synopsis
#include <xc.h>
double get_cal_data (const unsigned char * code_ptr)
Description
This function returns the 32-bit floating-point calibration data from the PIC MCU 14000
calibration space. Only use this function to access KREF, KBG, VHTHERM and KTC (that
is, the 32-bit floating-point parameters). FOSC and TWDT can be accessed directly as
they are bytes.
calibration space. Only use this function to access KREF, KBG, VHTHERM and KTC (that
is, the 32-bit floating-point parameters). FOSC and TWDT can be accessed directly as
they are bytes.