Module Stdio
- Inherit
_Stdio
 inherit _Stdio : _Stdio
- Typedef
close_callback_t
 localtypedeffunction(mixed|void:int)|zeroStdio.close_callback_t- Description
 The type for close callback functions.
- Typedef
fs_event_callback_t
 localtypedeffunction(mixed|void,int:int)|zeroStdio.fs_event_callback_t- Description
 The type for fs_event callback function functions.
- Typedef
read_callback_t
 localtypedeffunction(mixed|void,string:int|void)|function(mixed|void,Buffer:int|void)|function(mixed|void:int|void)|zeroStdio.read_callback_t- Description
 The various read_callback signatures.
The string (or void) version is used when buffer mode (see
set_buffer_mode) has not been enabled for reading.The Buffer version is used when a Buffer has been enabled for reading.
In both cases the data is the newly arrived data, but in buffered mode data you did not fully read in the last read callback is kept in the buffer.
- Typedef
read_oob_callback_t
 localtypedeffunction(mixed|void,string|void:int)|zeroStdio.read_oob_callback_t- Description
 The type for read out of band callback functions.
- Typedef
write_callback_t
 localtypedeffunction(mixed|void:int|void)|function(mixed|void,Buffer:int|void)|zeroStdio.write_callback_t- Description
 The various write_callback signatures.
The void version is used when buffer mode (see
set_buffer_mode) has not been enabled for writing.The Buffer version is used when a Buffer has been enabled for writing, add data to that buffer to send it.
- Typedef
write_oob_callback_t
 localtypedeffunction(mixed|void:int)|zeroStdio.write_oob_callback_t- Description
 The type for write out of band callback functions.
- Constant
DATA_CHUNK_SIZE
 finalconstantintStdio.DATA_CHUNK_SIZE- Description
 Size used in various places to divide incoming or outgoing data into chunks.
- Constant
TCSADRAIN
 constantstringStdio.TCSADRAIN- Description
 Argument to
Stdio.File()->tcsetattr().Change after all output has been written.
- Constant
TCSAFLUSH
 constantstringStdio.TCSAFLUSH- Description
 Argument to
Stdio.File()->tcsetattr().Change after all output has been written, and empty the input buffers.
- Constant
TCSANOW
 constantstringStdio.TCSANOW- Description
 Argument to
Stdio.File()->tcsetattr().Change immediately.
- Variable
stderr
 FILEStdio.stderr- Description
 An instance of FILE("stderr"), the standard error stream. Use this when you want to output error messages.
- See also
 
- Variable
stdin
 FILEStdio.stdin- Description
 An instance of FILE("stdin"), the standard input stream. Use this when you want to read anything from the standard input. This example will read lines from standard input for as long as there are more lines to read. Each line will then be written to stdout together with the line number. We could use
Stdio.stdout.write()instead of just write(), since they are the same function.- Example
 int main() { int line; while(string s=Stdio.stdin.gets()) write("%5d: %s\n", line++, s); }