cwal

s2: I/O API
Login

s2: I/O API

(⬑Table of Contents) (⬑Misc. Features Index)

s2 I/O API

This API gets installed by s2sh as s2.io. Client applications are free to install it (or not) under a different name.

This object contains a few I/O-related functions. None of its members require that this object be their this, so they can be copied for use in other contexts:

Function print( ... )

Outputs each of its arguments to s2's configured ouput channel, with a single space between each argument and a newline after the last one. Returns itself, so calls may be chained.

Function output(...)
Function output << ...

The output function provides the same feature as s2out but predates s2out by several years. s2out should be preferred.

void flush()

"Flushes" s2's configured output channel. This is truly never needed, and is provided in the API only for pedantic completeness.