IO.module



-- Copyright (C) International Computer Science Institute, 1994.  COPYRIGHT  --
-- NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY and is subject --
-- to the terms of the SATHER LIBRARY GENERAL PUBLIC LICENSE contained in    --
-- the file "Doc/License" of the Sather distribution.  The license is also   --
-- available from ICSI, 1947 Center St., Suite 600, Berkeley CA 94704, USA.  --
--------> Please email comments to "sather-bugs@icsi.berkeley.edu". <----------

(*

IO CLASSES

The most commonly used IO class in Sather is OUT, as seen in the
hello world program:

    #OUT + "Hello world.\n";

ERR works the same as OUT except output goes to standard error.

IN provides methods for getting input from standard in.  If you
are looking for exotic ways to parse input, take a look at
STR_CURSOR in Strings.  Instead of providing lots of ways to
read in different kinds of values, the Sather idiom is to read
in the whole file in one gulp into memory and parse it there as
a string.  For most purposes this works well.

FILE can be used to access files in a Unixish way.  BFILE is an
equivalent for binary files (the difference shows up in portability
issues.)  Both of these will probably be replaced by a more general
and portable file/directory mechanism in the future.

*)

-- This is a list of library files that can automatically
-- be loaded by a reference in users' SATHER_COMMANDS env variable

    err.sa -has err.sa ERR C_ERR
    file.sa -has file.sa FILE BFILE C_FILE
    in.sa -has in.sa IN C_IN
    out.sa -has out.sa OUT C_OUT
    stream.sa -has stream.sa $OSTREAM
    str_stream.sa -has str_stream.sa STR_STREAM