Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 179 -
------------------------------------------------------------------------------
6.25 Read a line string from standard input
. <Main>
------------------------------------------------------------------------------
[Name]
gets
[Syntax]
#include <stdio.h>
char *gets( char *buffer ) ;
[Arguments]
buffer Pointer to a buffer in which input characters are
stored.
[Return]
Returns address of a buffer specified in argument. Returns NULL if
any error or the end of file is detected. Use "feof" and "ferror"
functions to distinguish an error from EOF.
[Description]
Reads a line from the standard input stream (stdin) and stores it in
"buffer". A line is composed of all characters until the first
newline character('\n'). A newline character is replaced with a null
character('\0'). This function is similar to "fgets" function, buf
"fgets" doesn't replace a newline character.