[Top]
predef::
Stdio
|
Module Stdio
- 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(sprintf("%5d: %s\n",line++,s));
}
- Constant
PROP_BIDIRECTIONAL
-
constant Stdio.PROP_BIDIRECTIONAL
- FIXME
Document this constant.
- Constant
PROP_BUFFERED
-
constant Stdio.PROP_BUFFERED
- FIXME
Document this constant.
- Constant
PROP_SHUTDOWN
-
constant Stdio.PROP_SHUTDOWN
- FIXME
Document this constant.
- Constant
PROP_NONBLOCK
-
constant Stdio.PROP_NONBLOCK
- FIXME
Document this constant.
- Constant
PROP_IPC
-
constant Stdio.PROP_IPC
- FIXME
Document this constant.
- Constant
IPPROTO
-
constant Stdio.IPPROTO
- FIXME
Document this constant.
- Constant
__OOB__
-
constant Stdio.__OOB__
- Description
-
Implementation level of nonblocking I/O OOB support.
0 | Nonblocking OOB support is not supported.
|
1 | Nonblocking OOB works a little.
|
2 | Nonblocking OOB almost works.
|
3 | Nonblocking OOB works as intended.
|
-1 | Unknown level of nonblocking OOB support.
|
|
This constant only exists when OOB operations are
available, i.e. when __HAVE_OOB__ is 1.
- Constant
__HAVE_OOB__
-
constant Stdio.__HAVE_OOB__
- Description
-
Exists and has the value 1 if OOB operations are
available.
- Inherit
files
-
inherit files : files
- Variable
stderr
-
File Stdio.stderr
- Description
-
An instance of FILE("stderr"), the standard error stream. Use this
when you want to output error messages.
- Variable
stdout
-
File Stdio.stdout
- Description
-
An instance of FILE("stdout"), the standatd output stream. Use this
when you want to write anything to the standard output.
|