Tutorial by Topics: output

IO may be blocking/non-blocking and synchronous/asynchronous. POSIX API provides synchronous blocking API (e.g. classic read, write, send, recv calls), synchronous non-blocking API (same functions, file descriptors opened with O_NONBLOCK flag and IO-multiplexing calls) and asynchonous API (functions starting with aio_).

Synchronous API is usually used with "one thread/process per fd" style. This is dreadful for resources. Non-blocking API allows to operate with a set of fds in one thread.

To build a dynamic and interactive PHP program, it is useful to output variables and their values. The PHP language allows for multiple methods of value output. This topic covers the standard methods of printing a value in PHP and where these methods can be used.

Different ways to create subcommands like in hg or svn with the exact command line interface and help output as shown in Remarks section.

Parsing Command Line arguments covers broader topic of arguments parsing.

Input and Output in scheme is usually handled trough ports. A port is a data structure which is used to interact with the world outside Scheme. A Port isn't limited to files but can be used to read/write to sockets. In some ways, the port object is some kind of universal object that can not only manipulate file and sockets but any kind of read/write operation with the OS. For example, one could implement a port that can write to a printer or even control a CNC machine from Scheme using a port.

Page 1 of 2