IO.module



--------------------------->  GNU Sather - module  <---------------------------
-- Copyright (C) 1994 by International Computer Science Institute            --
-- This file is part of the GNU Sather package. It is free software; you may --
-- redistribute  and/or modify it under the terms of the  GNU General Public --
-- License (GPL)  as  published  by the  Free  Software  Foundation;  either --
-- version 2 of the license, or (at your option) any later version.          --
-- This  program  is distributed  in the  hope that it will  be  useful, but --
-- WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See Doc/GPL for more details.        --
-- The license text is also available from:  Free Software Foundation, Inc., --
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     --
-------------->  Please email comments to   <--------------

(*

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