Previous section To contents Next section

9.2 Buffered file management - Stdio.FILE

CLASS
Stdio.FILE Stdio.FILE is a buffered version of Stdio.File, it inherits Stdio.File and has most of the functionality of Stdio.File. However, it has an input buffer that allows line-by-line input. Note that the output part of Stdio.FILE is not buffered at this moment. The added functionality of Stdio.FILE is described here:

METHOD
Stdio.FILE.gets - get one line

SYNTAX
string gets();

DESCRIPTION
This function returns one line from the FILE, it returns zero if no more lines are available.

METHOD
Stdio.FILE.printf - formatted print

SYNTAX
string printf(string format, mixed ... data);

DESCRIPTION
This function does approximately the same as: write(sprintf(format,@data))

SEE ALSO
sprintf

METHOD
Stdio.FILE.ungets - put a string back in the buffer

SYNTAX
string ungets(string s);

DESCRIPTION
This function puts a string back in the input buffer. The string can then be read with read, gets or getchar.

METHOD
Stdio.FILE.getchar - get one character from the input stream

SYNTAX
int getchar();

DESCRIPTION
This function returns one character from the input stream. Note that the return value is the ascii value of the character, not a string containing one character.

Previous section To contents Next section